From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1NsNrt-0001Nb-Q8 for garchives@archives.gentoo.org; Thu, 18 Mar 2010 22:07:06 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5FEB6E0B1B; Thu, 18 Mar 2010 22:06:39 +0000 (UTC) Received: from mailin.taunusstein.net (mailin.taunusstein.net [193.138.96.2]) by pigeon.gentoo.org (Postfix) with ESMTP id 0489AE0B1B for ; Thu, 18 Mar 2010 22:06:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mailin.taunusstein.net (Postfix) with ESMTP id 5B39547A3E for ; Thu, 18 Mar 2010 23:06:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=taunusstein.net; h=user-agent:content-disposition:content-type:mime-version :message-id:subject:from:date:received:received:received :x-virus-scanned; s=tsst2008; t=1268949997; x=1270764397; bh=pr2 TQ1kWXs8HeX5FT8Ff8gANAe+SmF5UJzQkjj7lZqk=; b=uxKi3qHWQkrWMRfxJ8D 2ogKZdKPjbXD6AV//ZIryGaBEQHtj5vA3HLooG1empGGyZ7boAI8lgqcCUxckW4x 78oofDwnw53KVOzK1Va3cMuad9BEXaCgmn9YOt8o5kl8nMXmpnwuEhRhXjEvVQ3g UfKMLf8cOzfy9uESN5B+dO3c= X-Virus-Scanned: Debian amavisd-new at taunusstein.net Received: from mailin.taunusstein.net ([127.0.0.1]) by localhost (mail.taunusstein.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id NOEQrU2OH555 for ; Thu, 18 Mar 2010 23:06:37 +0100 (CET) Received: from nebukadnezar (p5087F818.dip.t-dialin.net [80.135.248.24]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: stefan.schulte@taunusstein.net) by mailin.taunusstein.net (Postfix) with ESMTPSA for ; Thu, 18 Mar 2010 23:06:37 +0100 (CET) Received: by nebukadnezar (nbSMTP-1.00) for uid 1000 (using TLSv1/SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)) stefan.schulte@taunusstein.net; Thu, 18 Mar 2010 23:06:47 +0100 (CET) Date: Thu, 18 Mar 2010 23:06:46 +0100 From: Stefan Schulte To: gentoo-user@lists.gentoo.org Subject: [gentoo-user] Setting up WLAN and VPN the right way Message-ID: <20100318220646.GA5261@nebukadnezar.matrix.de> Mail-Followup-To: gentoo-user@lists.gentoo.org Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="h31gzZEtNLTqOjlF" Content-Disposition: inline Jabber-ID: stefan.schulte@swissjabber.ch User-Agent: Mutt/1.5.20 (2009-06-14) X-Archives-Salt: 4fff52c8-a168-413f-92e0-8e76e2537931 X-Archives-Hash: 7e8643b721fe17f90959e2568929f5c8 --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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=3D"iproute2" modules_eth1=3D"!iwconfig wpa_supplicant" wpa_supplicant_eth1=3D"-Dwext" dhcp_eth1=3D"nosendhost nonis nontp" config_eth1=3D"dhcp" pppd_ppp0=3D" defaultroute noauth persist call fhdw holdoff 10 mru 1460 mtu 1460 idle 600" link_ppp0=3D"pty 'pptp vpn.bg.bib.de --nolaunchpppd'" 2) VPN Connection does work - pptpclient is installed - /etc/ppp/peers/fhdw with options usepeerdns and defaultroute - =BB/etc/init.d/net.ppp0 start=AB 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 =BBGenerated by net-scripts for interface=AB 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 --h31gzZEtNLTqOjlF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iQGcBAABAgAGBQJLoqPxAAoJEKsacVx2KYLoBNsMAIX2YSeKNBnYXENBseJTdoZd AsmsJx74ZBb5zfCDoq/CS9Gx/L1dInkyGeYuKjCJVHOqSTICeWUWlEaFKOQU+Mtz shg1+fub6H0i6cF3C75nqctyc4v4mx68b6y7Xf90Cu7MMgCuu8LW8VUXkJ+54TDr 8hm9JE6A6TD/cSFDvURRXrNNoY2GqLIxjpXiy0MbrfC5zwvYRO7ecJK6ysKC10Kw 9DzMKcmjgQyDpl14APWIKzu2u+WHNuyGpLUW9T25z0ICJUBU0Dd8X2PwBPA4HCSd B9aJDN0/3TtCtdg9d+aT4Q4Uxjx0nIm+DG5KUOPzNmD0113CW2GmT5udVNdhHYnh 3o/seyzuc5Ua+dfPLN2LvO1j2VBubHq1Mmz9aZF55HwTWTDg7dd+kbY1C7ObBRSa b+bk5cBKXDio5NxpeBEaAnIoZeBFT8gFQ6m129YHBgUGWhM7d+OsIVkJzdAk8auH yWhdEKDG4xhWjkG/gJ2kX0Qwh5hIOZSul5Za/jp2ow== =SJKB -----END PGP SIGNATURE----- --h31gzZEtNLTqOjlF--