Hi,
following is my /etc/network/interfaces entry.
The entry in line 51 (under gateway of vmbr4) seems to be ignored:
I have to set this route manually after boot and then it's working fine. What am I missing?
following is my /etc/network/interfaces entry.
Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet manual
auto vmbr0
iface vmbr0 inet dhcp
bridge-ports eth0
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A PREROUTING -i vmbr0 -d WAN_IP_1 -p tcp -m multiport ! --dport 1307,8006 -j DNAT --to 10.10.1.1
post-up iptables -t nat -A PREROUTING -i vmbr0 -d WAN_IP_1 -p udp -j DNAT --to 10.10.1.1
post-up iptables -t nat -A PREROUTING -i vmbr0 -d WAN_IP_1 -p icmp -j DNAT --to 10.10.1.1
post-up iptables -t nat -A PREROUTING -i vmbr0 -d WAN_IP_2 -p tcp -j DNAT --to 10.10.2.1
post-up iptables -t nat -A PREROUTING -i vmbr0 -d WAN_IP_2 -p udp -j DNAT --to 10.10.2.1
post-up iptables -t nat -A PREROUTING -i vmbr0 -d WAN_IP_2 -p icmp -j DNAT --to 10.10.2.1
auto vmbr1
iface vmbr1 inet static
address 10.10.1.2/30
bridge-ports none
bridge-stp off
bridge-fd 0
post-up iptables -t nat -A POSTROUTING -s '10.10.1.0/30' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.1.0/30' -o vmbr0 -j MASQUERADE
#WAN Subnet
auto vmbr2
iface vmbr2 inet static
address 10.10.2.2/30
bridge-ports none
bridge-stp off
bridge-fd 0
post-up iptables -t nat -A POSTROUTING -s '10.10.2.0/30' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.2.0/30' -o vmbr0 -j MASQUERADE
#WAN Subnet 2
auto vmbr4
iface vmbr4 inet static
address 172.22.0.2/22
gateway 172.22.0.1
post-up ip route add 172.16.0.0/16 via 172.22.0.1 dev vmbr4
bridge-ports none
bridge-stp off
bridge-fd 0
#LAN Subnet
auto vmbr5
iface vmbr5 inet manual
bridge-ports none
bridge-stp off
bridge-fd 0
#DMZ Subnet
iface eth0 inet6 static
address WAN_IP6
netmask 64
post-up ip -6 route add fe80::1 dev eth0
post-up ip -6 route add default via fe80::1 dev eth0
post-down ip -6 route del default via fe80::1 dev eth0
post-down ip -6 route del fe80::1 dev eth0
The entry in line 51 (under gateway of vmbr4) seems to be ignored:
Code:
post-up ip route add 172.16.0.0/16 via 172.22.0.1 dev vmbr4