I have 2 VLANs connected to a 'router'. All the machines can ping other machines within their own VLAN and the router. The router can ping all of the machines. I am trying to get machines to talk to other VLAN via the router.
On the router, the VLANs are on eth1 and eth2. I have added the following iptable rules:
-A FORWARD -i eth1 -o eth2 -j ACCEPT -A FORWARD -i eth2 -o eth1 -j ACCEPT
On machines within the VLANs I added the following route entry:
route add -net 172.16.0.0 netmask 255.255.255.0 gw 172.16.30.1
172.16.0.X is the ip address range in the other VLAN and
172.16.30.1 is the router's IP.
What did I do wrong? What did I not do?