Squib
08-31-2002, 01:58 PM
I'm having some trouble understanding the startup sequence relating to ethernet interfaces, ip_forward, etc...
I'm running Mandrake 8.1 as a gateway for another machine. I have two ethernet interfaces (eth0 to DSL modem, eth1 to hub serving "internal" machines) in the Linux box. I configured Roaring Penguin for my PPPoE service, and all ran well the first time I configured everything, after I remembered to set /proc/sys/net/ipv4/ip_forward to 1.
Next time I rebooted, nothing worked. After some trial and error (and completely by accident), I found that I had to run commands manually in the following order:
1) Set /proc/sys/net/ipv4/ip_forward to 1
2) Bring down both ethernet interfaces (through ifconfig down)
3) Bring up both ethernet interfaces (ifconfig up)
4) Start adsl connection
5) Run firewall script
Of course, I wanted to automate this. I modified /etc/sysconfig/network and changed forward_ipv4 to "true". I then added a couple of lines at the end of rc.local to bring up the DSL connection, then run the firewall script.
Unfortunately, it didn't work. Although it appears that things run in the proper order when observing the boot sequence, I must still give it a push by doing the above after the machine boots. Unless it is done, the machine acts as if nothing can go through. Sooo....what am I missing? I was a little confused with the rabbit trails in the startup config files, so maybe something has been placed improperly. Can anyone shed some light on this?
Thanks!
I'm running Mandrake 8.1 as a gateway for another machine. I have two ethernet interfaces (eth0 to DSL modem, eth1 to hub serving "internal" machines) in the Linux box. I configured Roaring Penguin for my PPPoE service, and all ran well the first time I configured everything, after I remembered to set /proc/sys/net/ipv4/ip_forward to 1.
Next time I rebooted, nothing worked. After some trial and error (and completely by accident), I found that I had to run commands manually in the following order:
1) Set /proc/sys/net/ipv4/ip_forward to 1
2) Bring down both ethernet interfaces (through ifconfig down)
3) Bring up both ethernet interfaces (ifconfig up)
4) Start adsl connection
5) Run firewall script
Of course, I wanted to automate this. I modified /etc/sysconfig/network and changed forward_ipv4 to "true". I then added a couple of lines at the end of rc.local to bring up the DSL connection, then run the firewall script.
Unfortunately, it didn't work. Although it appears that things run in the proper order when observing the boot sequence, I must still give it a push by doing the above after the machine boots. Unless it is done, the machine acts as if nothing can go through. Sooo....what am I missing? I was a little confused with the rabbit trails in the startup config files, so maybe something has been placed improperly. Can anyone shed some light on this?
Thanks!