* [gentoo-user] Setting up WLAN and VPN the right way
@ 2010-03-18 22:06 Stefan Schulte
0 siblings, 0 replies; only message in thread
From: Stefan Schulte @ 2010-03-18 22:06 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2098 bytes --]
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="iproute2"
modules_eth1="!iwconfig wpa_supplicant"
wpa_supplicant_eth1="-Dwext"
dhcp_eth1="nosendhost nonis nontp"
config_eth1="dhcp"
pppd_ppp0="
defaultroute
noauth
persist
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
BUT:
1)
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.
2)
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.
-Stefan
[-- Attachment #2: Type: application/pgp-signature, Size: 665 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-18 22:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-18 22:06 [gentoo-user] Setting up WLAN and VPN the right way Stefan Schulte
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox