Single IP network config


New Member
Apr 12, 2022
Hello, guys!
Here is the situation:
I have rented VDS with one IP. I have tried all the manual, that I find - It's wont working.

in /etc/network/interfaces
auto lo
iface lo inet loopback

iface lo inet6 loopback

# The primary network interface with IP

allow-hotplug enp5s0
auto enp5s0
iface enp5s0 inet static

# Bridge with NAT forwarding from a private subnet
auto vmbr0
iface vmbr0 inet static
    bridge-ports none
    bridge-stp off
    bridge-fd 0
    post-up echo 1 > /proc/sys/net/ipv4/ip_forward
    post-up iptables -t nat -A POSTROUTING -s '' -o enp5s0 -j MASQUERADE
    post-up iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1
    post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1
    post-down iptables -t nat -D POSTROUTING -s '' -o enp5s0 -j MASQUERADE
I google google google for two days already about 18 hours a day, and best of all i have got playing with it - it's that ping to start works, but no more, the dns wont working.. I a like a maniac, almost falling asleep but cant sleep before i fix it. Where should i look?
I found an article the man make a proxy on one vm, but it doesn't looks like good solution..
The vmbr0 section of the config looks okay to me, but there are issues with enp5s0.
In short, I guess that it should look like:
allow-hotplug enp5s0
auto enp5s0
iface enp5s0 inet static

Changes to enp5s0:
  • Specify netmask '/25' which is in the same subnet as the default gateway (covers addresses from to
  • Remove 'netmask' line, which conflicted with the subnet given in the address line (see CIDR notation [1]), so that only a single subnet mask is specified.
  • Remove 'dns-nameservers' line. DNS servers should be specified in the file '/etc/resolv.conf', not in '/etc/network/interfaces'

If you have the package ifupdown2 [2] installed (default with Promxox VE 7.x), please make this change, then run the command: ifreload -a
If you have not installed ifupdown2, please reboot the server for the change to take effect.



The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!