LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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
 
LinkBack Search this Thread
Old 05-26-2004, 05:23 PM   #1
carrellc
LQ Newbie
 
Registered: Mar 2004
Posts: 6

Rep: Reputation: 0
Routing command needed


Hiyas!

I need help with this little routing problem this is a quick description of our site setup

I have our main linux box as 10.1.0.1 internally
I just set up a vpn between our site and our new shop. the vpn box internally is set to 10.1.1.1 [same site as 10.1.0.1.At our new shop the vpn is set to 10.12.0.1

if I have 10.1.1.1 as the gateway instead of 10.1.0.1 I can ping the addresses in the 10.12.x.x scope at the new site but then i break my existing other sites connected. Also note if the gate way on a machine on old site has 10.1.1.1 as gateway i can ping it from the 10.12.x.x site as well if its 10.1.0.1 i cannot.

So i need to do a route on the linux server that will have anything that hits the 10.12.x.x scope it goes though 10.1.1.1

whats the command i need for this i am pretty frustrated. I know how do modify our firewall that uses iptables and i asume the route line goes in there

Please help me
Clint
 
Old 05-26-2004, 05:30 PM   #2
slacky
Member
 
Registered: Feb 2004
Location: USA
Distribution: Debian
Posts: 174

Rep: Reputation: 16
You can modify the routing tables with the route command, so something like this (obviously I can't test this myself):
route add -net 10.12.0.0 netmask 255.255.0.0 gw 10.1.1.1
 
Old 05-26-2004, 06:00 PM   #3
carrellc
LQ Newbie
 
Registered: Mar 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Hi!
Thx for posting i think we are close this is a redhat 9 box so syntax may be off a bit

i am tryin something like:

ip route add nat 10.12.0.0/24 gw 10.1.1.1

it does not understand the gw syntax may have few syntax few more errors here anyone know command needed?

-Clint
 
Old 05-27-2004, 08:06 AM   #4
Bambi
Newbie
 
Registered: Aug 2003
Location: Toronto, Canada
Distribution: RedHat
Posts: 13

Rep: Reputation: 0
Is it not

ip route add nat 10.12.0.0/24 via 10.1.1.1
 
Old 05-27-2004, 04:55 PM   #5
carrellc
LQ Newbie
 
Registered: Mar 2004
Posts: 6

Original Poster
Rep: Reputation: 0
the /24 pooches it is i remove it i get no errors but then i am not getting the result i want anymore. is there another way to type that line. Thanks all for posting and trying to help btw

Clint
 
Old 05-28-2004, 07:53 AM   #6
Bambi
Newbie
 
Registered: Aug 2003
Location: Toronto, Canada
Distribution: RedHat
Posts: 13

Rep: Reputation: 0
What about ...

ip route add nat 10.12.0.0/24 via 10.1.1.1 table local
 
Old 05-28-2004, 10:59 AM   #7
LuggerHouse
Member
 
Registered: May 2004
Location: Montreal,QC,Canada
Distribution: Fedora Core 7
Posts: 208

Rep: Reputation: 30
Quote:
Originally posted by slacky
You can modify the routing tables with the route command, so something like this (obviously I can't test this myself):
route add -net 10.12.0.0 netmask 255.255.0.0 gw 10.1.1.1
This command is perfectly suitable for a RH9.0 box.

Obviously, this was not what you where looking for. You might have liked an entry to your iptables script.

there is two things to consider:

1- you need to add a route to your routing table before you edit your iptables script
2- after you will need to add an entry to your iptables script in order to nat those adresses.

So there's some reading to be done!!

DOnt give up!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
linux Command needed cherupop Linux - Newbie 4 07-05-2005 11:33 PM
Special case of routing mudule needed! woosting Linux - Networking 5 06-03-2005 06:43 AM
command line help needed mykrob Linux - Software 5 10-08-2004 12:10 AM
sendmail: Routing dead mail to a shell command? noisybastard Linux - Networking 1 10-05-2003 04:13 PM
Routing Problem? Help Needed. KevinGuy Linux - Networking 7 07-12-2003 04:21 AM


All times are GMT -5. The time now is 01:50 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration