Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
routing traffic over vpn
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
phill15
n00b
n00b


Joined: 09 Feb 2008
Posts: 6

PostPosted: Sat Feb 09, 2008 10:30 pm    Post subject: routing traffic over vpn Reply with quote

Hi i've just created a vpn using ppp over ssh, i can ping the vpn server from client and vice versa but what i want to do is be able to route my client internet traffic over the vpn, currently its using the default local network gateway
Back to top
View user's profile Send private message
papahuhn
l33t
l33t


Joined: 06 Sep 2004
Posts: 626

PostPosted: Sat Feb 09, 2008 10:57 pm    Post subject: Reply with quote

You need to set a host route to the other end of the vpn tunnel (the address which was given to ssh), remove the current default route and set a new default route via the ppp interface of the tunnel.
_________________
Death by snoo-snoo!
Back to top
View user's profile Send private message
phill15
n00b
n00b


Joined: 09 Feb 2008
Posts: 6

PostPosted: Sat Feb 09, 2008 11:43 pm    Post subject: Reply with quote

hey thanks for the reply i've tried doing that but it doesn't work for some reason (probably because im doing it wrong), im doing what you said like first i did route add -host <server ip> eth0 and then i did route add default gw <vpn server ip> ppp0, but nothing happened, what actually happened was i couldn't communicate anymore on my network and the internet.
Back to top
View user's profile Send private message
phill15
n00b
n00b


Joined: 09 Feb 2008
Posts: 6

PostPosted: Sun Feb 10, 2008 1:30 am    Post subject: Reply with quote

btw will i have to ip masqeurade on the vpn server?
Back to top
View user's profile Send private message
phill15
n00b
n00b


Joined: 09 Feb 2008
Posts: 6

PostPosted: Sun Feb 10, 2008 1:38 am    Post subject: Reply with quote

its ok i figured it out
Back to top
View user's profile Send private message
phill15
n00b
n00b


Joined: 09 Feb 2008
Posts: 6

PostPosted: Sun Feb 10, 2008 2:01 am    Post subject: Reply with quote

actually i've still got a problem, i can route certain traffic through the vpn link by doing route add google.com gw <vpn ip> ppp0, what this is saying is route all going to google.com to the vpn ip, but i can't figure out a way to route all traffic through the vpn
Back to top
View user's profile Send private message
phill15
n00b
n00b


Joined: 09 Feb 2008
Posts: 6

PostPosted: Sun Feb 10, 2008 3:43 am    Post subject: Reply with quote

its ok now i've finally got it all working
Back to top
View user's profile Send private message
papahuhn
l33t
l33t


Joined: 06 Sep 2004
Posts: 626

PostPosted: Sat Aug 08, 2009 4:43 pm    Post subject: Reply with quote

sirlark wrote:
I've found that if I remove the default route, then my ssh/ppp tunnel goes down, because there's no route for the ssh connection over the 'normal' network link.

papahuhn wrote:
You need to set a host route to the other end of the vpn tunnel

_________________
Death by snoo-snoo!
Back to top
View user's profile Send private message
sirlark
Guru
Guru


Joined: 25 Oct 2004
Posts: 306
Location: Limerick, Ireland

PostPosted: Sat Aug 08, 2009 4:57 pm    Post subject: Reply with quote

Hi phil15,

I'm stuck basically where you were at first posting. Could you please post your solution. I've found that if I remove the default route, then my ssh/ppp tunnel goes down, because there's no route for the ssh connection over the 'normal' network link.

Thanks
_________________
Adopt an unanswered post today
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum