Hi all,
The default network config works fine with a Vultr VPS and NAT:
But how do I add a second public IP too this config or must I use the routed method like this(with the vmbr0 being the second public IP)?
The default network config works fine with a Vultr VPS and NAT:
Code:
iface ens3 inet manual
auto vmbr0
iface vmbr0 inet static
address 202.111.81.143/23
gateway 202.111.80.1
bridge-ports ens3
bridge-stp off
bridge-fd 0
auto vmbr1
iface vmbr1 inet static
address 10.0.0.1/24
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 '10.0.0.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.0.0.0/24' -o vmbr0 -j MASQUERADE
#port forwards
post-up iptables -t nat -A PREROUTING -i vmbr0 -p udp --dport 53 -j DNAT --to 10.0.0.20:53
post-down iptables -t nat -D PREROUTING -i vmbr0 -p udp --dport 53 -j DNAT --to 10.0.0.20:53
But how do I add a second public IP too this config or must I use the routed method like this(with the vmbr0 being the second public IP)?
Code:
auto ens3
iface ens3 inet static
address 198.51.100.5
netmask 255.255.255.0
gateway 198.51.100.1
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up echo 1 > /proc/sys/net/ipv4/conf/ens3/proxy_arp
auto vmbr0
iface vmbr0 inet static
address 203.0.113.17
netmask 255.255.255.248
bridge_ports none
bridge_stp off
bridge_fd 0
Last edited: