Quote:
Originally posted by maxut
stop iptables.
or delete rules:
iptables -F
so it will become a router without filter. what's your distro?
|
thanks for the reply, please have a look at below explanation:
Setup:
LAN-------SW-------------[eth0 linux box with redhat 9.0 eth1]--------client pc
Eth0: 192.168.10.40 with 192.165.10.0 network
Router/GW: 192.168.10.1
Eth1: 192.168.20.1 with 192.168.20.0 network
Client PC: 192.168.20.25 with gateway:192.168.20.1
I want to route any type of traffic between eth0 and eth1.
Here is “route” command output:
192.168.20.0 * 255.255.255.0 U 0 0 0 eth1
192.168.10.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 l0
and
I have enabled IP-forwarding using
< echo "1" > /proc/sys/net/ipv4/ip_forward >
And FORWARD_IPV4=yes in sysctl.conf file.
With the above basic setup, I am able to ping
Ø client PC to eth1, eth0
Ø LAN PC to eth0 only
With the following implementation:
iptables –t nat -A POSTROUTING –o eth0 –j MASQUERADE
I am able to ping:
Ø client PC to eth1, eth0 and LAN PCs
Ø LAN PC to eth0 only
I am not able to ping either eth1 or client PC from LAN PCs. Why?
-Thanks,
Thiru