LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-30-2006, 12:53 PM   #1
conradg
LQ Newbie
 
Registered: Mar 2006
Posts: 2

Rep: Reputation: 0
Question Multi Homed Gateway Router Problem


I Have the Following Network Setup.

Internet ISP 1 = Cable Modem
Internet ISP 2 = ADSL Modem

Linux 7.3 Gateway PC
NIC 1 Internal LAN Static Assigned
NIC 2 ISP 1 DHCP Assigned
NIC 3 ISP 2 Static Assigned.

I am using IPTABLES as the Firewall with NAT

where NIC 1 SNAT > NIC 2 Works OK.

I would like to manual be able to change ISP 2 as Internet Route
but when I change SNAT to use NIC 3 it will not work.

During all testing the IPTABLES Firewall is set to allow all input,output and forward rules.

The following Works OK

iptables -t nat -A POSTROUTING -s ${INET}${IMASK} -o ${OIF} -j SNAT --to-source ${OIP}

The Following fails

iptables -t nat -A POSTROUTING -s ${INET}${IMASK} -o ${OIF2} -j SNAT --to-source ${OIP2}

routing table displays

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.X.0 * 255.255.255.0 U 0 0 0 eth0
207.x.x.0 * 255.255.255.0 U 0 0 0 eth1
68.x.0.0 * 255.255.254.0 U 0 0 0 eth2
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 68.x.0.1 0.0.0.0 UG 0 0 0 eth2
default * 0.0.0.0 U 0 0 0 eth1

I do not what to use both at the same time and only manually change if one of the ISP connections is down, or I require to test a service from a difference source IP Address.

Thanks if you have some ideas of where to go.

Is there any tools that displays what route a packet will take ?
 
Old 03-30-2006, 02:56 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
There is a root program called "tracepath".

Is the third octet of your dsl's IP address 0? Also, I don't get the last line of your route table.

If you only want to use either Cable or DSL, then shut down the unused interface.
 
Old 03-30-2006, 11:51 PM   #3
conradg
LQ Newbie
 
Registered: Mar 2006
Posts: 2

Original Poster
Rep: Reputation: 0
I need both interfaces running since I connect to them from remote systems.

ip route add default via 207.x.1.1 table 1
ip route add 207.x.1.0 dev eth1 src 207.x.1.35 table 1
ip rule add from 207.x.1.35 table 1 priority 100

ip route add 68.x.0.0 dev eth2 src 68.151.1.60 table 2
ip rule add from 68.x.1.60 table 2 priority 800

These are additional route info at startup.

No the DSL IP is 207.x.1.0 is correct.


Quote:
Originally Posted by jschiwal
There is a root program called "tracepath".

Is the third octet of your dsl's IP address 0? Also, I don't get the last line of your route table.

If you only want to use either Cable or DSL, then shut down the unused interface.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux as router/gateway/firewall to dsl-router sjoerdvvu Linux - Networking 2 02-24-2006 10:56 PM
Multi homed gateway nukenstien Linux - Networking 4 02-10-2005 10:07 AM
Linux Routing to Multi-Homed Host MightyCranium Linux - Networking 0 03-16-2004 05:14 PM
Proper Solution for Multi-Homed IP ytene Mandriva 0 08-25-2003 06:14 AM
Problems running a multi-homed Solaris 8 host!!! Olusegun Solaris / OpenSolaris 2 06-08-2003 06:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration