Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

how do I enable packet forwarding for an ethernet dsl modem? Must this be done with iptables?

share|improve this question
    
Why did you remove 95% of your question? You've removed all the useful information and made it harder to answer for your specific problem. –  David Pashley Jun 10 '09 at 7:02
add comment

4 Answers 4

You enable packet forwarding on a Linux (2.6.x kernel) router by executing the following command as root ...

# echo "1" >/proc/sys/net/ipv4/ip_forward

You will need to execute this command every time you start/reboot your machine. Add the command to your equivalent of /etc/rc.local so that it is automatically executed for you.

share|improve this answer
1  
or put "net.ipv4.ip_forward=1" in /etc/sysctl.conf, which is the easiest way of setting values in proc. –  David Pashley Jun 10 '09 at 7:05
add comment

Log in as root. Type the following exactly as it appears

echo 1 > /proc/sys/net/ipv4/ip_forward

Then type this exactly as it appears

echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf

The first line sets packet forwarding in the kernel; the second line ensures that it survives a reboot.

share|improve this answer
add comment

I'm assuming this is an DSL router presented as an ethernet device. Are you able to ping the internal interface of the router? If not, there's a configuration problem on the lan side of the device.

Does the router have diagnostic tools built in? Can you ping out from the router? Can you ping an internal device? If you can, then the problem lies in the forwarding between the two interfaces. It could be a firewall or a possible NAT problem.

If you can't ping out, then there is a problem with the DSL connection. If you can't ping in, then there's a problem with the LAN interface.

share|improve this answer
    
I can ping the address on ppp0, just not the isp –  Bill Gray Jun 9 '09 at 23:15
    
Is this a USB or Ethernet modem? –  David Pashley Jun 9 '09 at 23:28
    
ethernet modem.. –  Bill Gray Jun 9 '09 at 23:43
1  
It hasn't logged onto your ISP properly, I'm guessing it hasn't been given the external gateway address. Use it's admin screen to disconnect and then reconnect. –  staticsan Jun 10 '09 at 6:01
    
Yes, it would appear that some settings were not correctly set on the new modem. I'd contact the ISP support and get them to help you check all your settings. –  David Pashley Jun 10 '09 at 7:04
add comment

If I understand your question correctly, iptables won't help you. It sounds like you can ping your ethernet router, but nothing beyond it. To figure this out, you need to tell us what router model you have and whether you have static or dynamic IP addresses.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.