public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Stefan Schulte <stefan.schulte@taunusstein.net>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Setting up WLAN and VPN the right way
Date: Thu, 18 Mar 2010 23:06:46 +0100	[thread overview]
Message-ID: <20100318220646.GA5261@nebukadnezar.matrix.de> (raw)

[-- 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 --]

                 reply	other threads:[~2010-03-18 22:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100318220646.GA5261@nebukadnezar.matrix.de \
    --to=stefan.schulte@taunusstein.net \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox