Hi All,
I'm trying to use my linux box to act as an Internet gateway for my local lan. I have two ethernet cards in the linux box, which is eth0 and eth1.
The linux box access the Internet through a 1.5Mbps speed ADSL connected to eth1 and my local lan is connected at the interface eth0.
I use the application "adsl-setup" & "adsl-start" as my dial-up program to connect to the ADSL service provider.
When I dial, an additional interface PPP0 will appear in output of the "ifconfig -a"
I have referenced to the IP Masquerading Howto and following the example and type the following commands into a script file which will facilitate my linux box to perform IP masquerade.
Here are the commands:
/sbin/depmod -a
/sbin/modprobe ip_masq_ftp
echo "1" > /proc/sys/net/ipv4/ip_forward
echo "1" > /proc/sys/net/ipv4/ip_always_defrag
echo "1" > /proc/sys/net/ipv4/ip_dynaddr
/sbin/ipchains -M -S 7200 10 160
/sbin/ipchains -A input -j ACCEPT -i eth1 -s 0/0 67 -d 0/0 68 -p udp
/sbin/ipchains -P forward DENY
/sbin/ipcahins -A forward -i eth0 -s 192.168.0.0/24 -j MASQ
I setup all of above and dial the connection and run the script. I try to ping the IP of the provider's DNS server from the PC which in the local lan other than the linux box.
And it can't ping the IP. Then I use the trace route in the client PC to verify the path. Here is the path:
1. From the client PC
2. to eth0
3. request timed out
4. request timed out
5. request timed out
6. request timed out
It seems that the network setting of my client PC is alright since it can go the interface eth0. However, there the trace is stop when it come to the interface eth0. Does my linux box will perform the IP forwarding when it received packet from the interface eth0 and the packet's destination is somewhere in Internet?
I don't know what's wrong with my setting. Anybody can give me some hints!
Thank you for your attention
Best Regards,
Jeff Li
I'm trying to use my linux box to act as an Internet gateway for my local lan. I have two ethernet cards in the linux box, which is eth0 and eth1.
The linux box access the Internet through a 1.5Mbps speed ADSL connected to eth1 and my local lan is connected at the interface eth0.
I use the application "adsl-setup" & "adsl-start" as my dial-up program to connect to the ADSL service provider.
When I dial, an additional interface PPP0 will appear in output of the "ifconfig -a"
I have referenced to the IP Masquerading Howto and following the example and type the following commands into a script file which will facilitate my linux box to perform IP masquerade.
Here are the commands:
/sbin/depmod -a
/sbin/modprobe ip_masq_ftp
echo "1" > /proc/sys/net/ipv4/ip_forward
echo "1" > /proc/sys/net/ipv4/ip_always_defrag
echo "1" > /proc/sys/net/ipv4/ip_dynaddr
/sbin/ipchains -M -S 7200 10 160
/sbin/ipchains -A input -j ACCEPT -i eth1 -s 0/0 67 -d 0/0 68 -p udp
/sbin/ipchains -P forward DENY
/sbin/ipcahins -A forward -i eth0 -s 192.168.0.0/24 -j MASQ
I setup all of above and dial the connection and run the script. I try to ping the IP of the provider's DNS server from the PC which in the local lan other than the linux box.
And it can't ping the IP. Then I use the trace route in the client PC to verify the path. Here is the path:
1. From the client PC
2. to eth0
3. request timed out
4. request timed out
5. request timed out
6. request timed out
It seems that the network setting of my client PC is alright since it can go the interface eth0. However, there the trace is stop when it come to the interface eth0. Does my linux box will perform the IP forwarding when it received packet from the interface eth0 and the packet's destination is somewhere in Internet?
I don't know what's wrong with my setting. Anybody can give me some hints!
Thank you for your attention
Best Regards,
Jeff Li