linux router
I have three pcs. They are referred as:
pcA: NIC 192.168.1.2, subnet mask: 255.255.255.0 default gateway 192.168.1.1 pcB: NIC 192.168.2.2, subnet mask: 255.255.255.0 default gateway 192.168.2.1 pcRouter: two NICs: eth0 192.168.1.1, subnet mask: 255.255.255.0 eth1 192.168.2.1, subnet mask: 255.255.255.0 this command is executed: echo 1 > /proc/sys/net/ipv4/ip_forward when I ping from pcA: ping 192.168.2.2 ping returned: From 192.168.1.1 icmp_seq=1 destination Host Prohibited |
Have you set your IP tables rules to route the packets?
|
one of the easiest way to do it is NAT:
iptables -t nat -A POSTROUTING -i eth0 -o eth1 -j MASQUERADE iptables -t nat -A POSTROUTING -i eth1 -o eth0 -j MASQUERADE that should work correctely spring logout |
All times are GMT -5. The time now is 12:31 AM. |