iproute2 multiple gateway

Publié le

Workstation has ip 172.16.11.12 and gateway 172.16.11.254 Linux router has 4 nics with the following IP: 172.16.11.254 eth1 172.16.22.254 eth2 100.64.0.254 eth3 195.101.99.99 eth0 The default gw to reach internet is 195.101.99.99 Internet can also be reache through 100.64.0.254 All the traffic coming to the linux router uses the default gw 195.101.99.99 eth0 to reach … Lire la suite iproute2 multiple gateway

iptables FORWARD with and without NAT

Publié le

Simple forward from network 192.168.0.0/24 to network 172.16.0.0/24. GW 192.168.0.1 and 172.16.0.1 iptables -A FORWARD -i eth1 -o eth0 -s 192.168.0.0/24 -d 172.16.0.0/24 -m state –state NEW,ESTABLISHED -j ACCEPT iptables -A FORWARD -i eth0 -o eth1 -s 172.16.0.0/24 -d 192.168.0.0/24 -m state –state ESTABLISHED,RELATED -j ACCEPT On the gateway tcpdump will show: 05:58:48.316239 IP 192.168.0.22 … Lire la suite iptables FORWARD with and without NAT