LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-13-2009, 08:30 AM   #1
hvc123
Member
 
Registered: Jun 2004
Posts: 33

Rep: Reputation: 16
Driving me mental!!!!!! STATIC ROUTES


Hi all,
first of the ips here are not real so please dont flame me for using a broadcast address or something its just for examples
hope you gurus can help

i have a vpn to my work network (work lan 10.0.0.1)
when i connect using my vpnc-connect work.conf i can ping everything on my work lan.

@ work we have vpns from our router to other peoples networks.

i e if i want to ping another network @ work 192.168.1.0/24 it works
so the static routes at work are fine.

the problem is that i tunnell in and i get a 10.0.0.1 address i can not for instance ping 192.168.1.2 range that i can at work so i tried a few route adds
so this one i tried to add a route. destination network 192.168.1.0/24 gw 10.0.0.1 (this is the gateway at work say) dev tun0

sudo route add -net 192.168.1.0 netmask 255.255.255.0 gw 10.0.0.1 dev tun0

my machine took the route but im still unable to ping the 192 address.
tried the above route again but with my tun0 address as the gw still no joy.....


help please ...............

thanks all

Last edited by hvc123; 01-13-2009 at 09:24 AM.
 
Old 01-13-2009, 10:04 AM   #2
hvc123
Member
 
Registered: Jun 2004
Posts: 33

Original Poster
Rep: Reputation: 16
does anyone understand what i mean ??? and poss help
 
Old 01-13-2009, 11:27 PM   #3
rustyscott
LQ Newbie
 
Registered: Jan 2009
Posts: 5

Rep: Reputation: 0
Do you have linux firewall (iptables) enabled on your machine at home? If so try turning it off temporarily and see if you can ping the work network. I recently solved a brain-numbing issue in my VPN that sounds like it could be similar to what you are experiencing. I kept debugging routing when in reality it was a firewall issue.
 
Old 01-14-2009, 01:28 PM   #4
hvc123
Member
 
Registered: Jun 2004
Posts: 33

Original Poster
Rep: Reputation: 16
no i have no firewall running.... not that i know of this machine is hanging off a router/firewall

i can ping my work address's fine (10.1.1.0/24)but i cant seem to get out of my works network.
i mean we have customers on another range (192.168.1.0/24) which i can reach fine at work just not from home.

to ping those networks i have to ssh to a machine/router at work through my vpn and then i can ping them from the machine @work.

i wonder if i need to add a route to our router at work to redirect the traffic back to my ip

its a mind meld

Last edited by hvc123; 01-14-2009 at 04:42 PM.
 
Old 01-14-2009, 05:21 PM   #5
rustyscott
LQ Newbie
 
Registered: Jan 2009
Posts: 5

Rep: Reputation: 0
So is this rough diagram right?

|Home|->(10.0.0.1:tun0)->|Work (10.1.1.0/24)|->|Offsite Customers 192.168.1.0/24|

This is what I gathered from your posts. If it is correct, then there needs to be some kind of route between the 192.168.1.0/24 and your 10.0.0.1 machine. Depending on what the customer sites are doing (are they under your control?) you might need to have some kind of NAT enabled so that packets returning to 10.0.0.1 get sent through their appropriate tunnels to your work. Their VPNs will know about the 10.1.1.0/24 network, but not your 10.0.0.0/24 (assumed) network you have connected to at work.

HTH,
Rusty
 
Old 01-15-2009, 09:45 AM   #6
hvc123
Member
 
Registered: Jun 2004
Posts: 33

Original Poster
Rep: Reputation: 16
thanks guys, figured it out today........

my WORK vpn dishes out a different ip than what the work lan has , ie. work lan 10.1.1.0/24 vpn 10.1.2.0/24

so i had to basically and a static route on the customers router to send traffic back

i wonder if i could just use our gatweway instead of having to add routes to all our customers routers ????
 
Old 01-15-2009, 02:20 PM   #7
rustyscott
LQ Newbie
 
Registered: Jan 2009
Posts: 5

Rep: Reputation: 0
Do the customers connect through a VPN mechanism as well? If so, you could set your work router to connect them to a 10.1.0.0/22 network so that their routes to both the work lan and the VPN zone are established automatically. However, that may not be exactly what you want either.

Rusty
 
  


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
Static routes using routes/ifroutes-eth-id.. files and default gateway disabled TimtheEagle Linux - Networking 0 05-31-2008 07:08 PM
static routes and ifconfig yiux Linux - Networking 4 06-11-2007 06:24 PM
Max Static Routes? roundst Linux - Networking 2 07-28-2005 02:51 AM
automatic static routes? eantoranz Linux - Networking 5 07-19-2005 08:30 PM
static-routes in Mandrake 10.0 tallthom Mandriva 1 09-27-2004 12:51 AM

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

All times are GMT -5. The time now is 09:36 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