So I applied the above into practice but I've run into a problem. Here is the situation.
I've turned server ns1 (a dual-homed linux box) into a router by enabling ip_forwarding on it (echo 1 > /proc/sys/net/ipv4/ip_forward)
Server ns1:
eth0: 10.10.0.200/24 (default gw: 10.10.0.51)
eth1: 192.168.53.198/24 (I've not set any default gw for this interface)
Routing table on server ns1:
----------------------------
Code:
[root@ns1 ~]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.53.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.10.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 10.10.0.51 0.0.0.0 UG 0 0 0 eth0
I'm trying to ping a webserver (having an ip of 10.10.0.54) from a workstation BUT NOT SUCCEEDING. The properties of workstation are:
eth0: 192.168.53.150/24
default gateway: 192.168.53.198
Here is the routing table on my workstation:
--------------------------------------------
Code:
root@workpc:~# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.53.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.53.198 0.0.0.0 UG 0 0 0 eth0
Why is my workstation not able to reach 10.10.0.54? I believe I've setup everything correctly. Please help. Thank you.