1

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

Bill Gray
  • 1,345
  • 1
  • 11
  • 18
  • 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 07:02

4 Answers4

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.

Convict
  • 1,613
  • 10
  • 8
1

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.

Avery Payne
  • 14,536
  • 1
  • 51
  • 88
0

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.

David Pashley
  • 23,497
  • 2
  • 46
  • 73
0

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.

Eddie
  • 11,432
  • 8
  • 37
  • 48