FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

LinkBack Thread Tools
Old 03-18-2010, 09:06 PM
Stefan Schulte
Default Setting up WLAN and VPN the right way

Hi at all,

I'm trying to setup VPN on my Laptop but I'm stuck. When I'm at the
university I have to connect to their WLAN and then setting up a
VPN-Connection. All packets should take the VPN-tunnel. Here's what I've
got so far:

1) W-LAN connection works and I get an ip, default route and DNS-Servers
via dhcp

- eth1 is my WLAN-Device
- ppp0 is my VPN-Device
- vpn.bg.bib.de is the disired VPN-Server
snippet of /etc/conf.d/net:

modules_eth1="!iwconfig wpa_supplicant"
dhcp_eth1="nosendhost nonis nontp"

call fhdw
holdoff 10
mru 1460
mtu 1460
idle 600"
link_ppp0="pty 'pptp vpn.bg.bib.de --nolaunchpppd'"

2) VPN Connection does work
- pptpclient is installed
- /etc/ppp/peers/fhdw with options usepeerdns and defaultroute
- »/etc/init.d/net.ppp0 start« does start the vpn connection

After the tunnel is up, /etc/ppp/ip-up.d/40-dns.sh is supposed to
replace the dhcp-nameservers with dns-servers behind the VPN-server
stored in /etc/ppp/resolv.conf. Unfortunately
the resolv.conf is immediatly altered a second time by baselayout or
whatever is writing these »Generated by net-scripts for interface«
lines and then I've no nameserver at all. I have to do a
cat /etc/ppp/resolv.conf >> /etc/resolv.conf
every time after the tunnel is up.

After the tunnel is up I have two default routes. One for eth1 and one
for ppp0. So I manually set up a hostroute for the vpn-server with the
eth1 gateway and then delete the default route for eth1. After that the
VPN-Server is reached through eth1 and all the rest through ppp0
Unfortunately the default route for eth1 appears again after a few
minutes (I guess dhcpcd is to blame) and every connection breaks down
until I delete the route again.

So how do you set up a VPN correctly? Or is there is any documentation
I've missed?

BTW: I'm using fluxbox and no networkmanager or stuff like that.


Thread Tools

All times are GMT. The time now is 10:53 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org