LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Route dialup modem packets back through dialup instead of default route cable modem (http://www.linuxquestions.org/questions/linux-networking-3/route-dialup-modem-packets-back-through-dialup-instead-of-default-route-cable-modem-106287/)

jogress 10-20-2003 11:15 AM

Route dialup modem packets back through dialup instead of default route cable modem
 
Hi,

I have a linux 2.4.22 box running pppd 2.4.1. On it, I have 2 ethernet cards and one external serial dialup modem.

eth0 is my default gateway and it does dhcp to my cable provider

eth1 is my lan

ppp0 is my dialup

(this is redhat 9)

$ more /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=go.XXXXXX.com (paranoid)
GATEWAYDEV=eth0

$ more /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes

$ more /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
BROADCAST=10.0.1.255
IPADDR=10.0.1.1
NETMASK=255.255.255.0
NETWORK=10.0.1.0
ONBOOT=yes

*curses* darn i left my modem off at home, and i'm an hour away. I was going to connect and paste the route table. Anyways, maybe I dont need it.

Basically, when the modem connects, I cant get anything to talk to it. It sits there happy at layer 2, but layer 3 is broken... no routing. I can set host and net routes manually, though. I know everything is happy up to layer 3. In fact I can down my eth0 and use ppp0 for inet access if need be. (but that of course makes sense because it gets me down to one network interface other than my non routing lan node)

What I want is, if a packet comes in on the dialup modem's IP address, I want it to go back out the interface it came in on (ppp0 in this case). What I believe is happening is that the packets are dropping out my default route, creating an asymmetrical route that is getting all confused. Now, I believe it should work anyways, but thats another issue altogether. I just want them to go back out the interface from whence it came. (heh.. I said 'whence')

I havent bothered learning how a packet sniffer works yet, but that might be my next attempt, if I get into it enough. It's just a backup link, but I'd prefer to just leave it connected for no reason other than giving phone spammers a constant busy.

I do have a packet filter (iptables) running, but I've tried flushing it to no avail. If anyone thinks I should paste a copy of this in anyways, just say the word. It's not psycho but it's verbose and I dont want to drown my post.

peter_robb 10-21-2003 04:48 PM

What you've described is nearly word for word in the http://tldp.org/HOWTO/Adv-Routing-HOWTO/

Have a look at Chapter 4. It describes using iproute2 to manage multiple internet providers.

Once you have it running I can copy you some script changes to make it operate with ifup/ifdown.


All times are GMT -5. The time now is 09:42 PM.