Forum
[PROBLEM] Trouble with PPTP or L2TP VPN connection - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Configuration (/forum-17.html)
+--- Thread: [PROBLEM] Trouble with PPTP or L2TP VPN connection (/thread-1416.html)



Trouble with PPTP or L2TP VPN connection - kraleksandr - 28th Sep, 2013 08:06 PM

When I trying to set up pptp-VPN (pptp-linux) or l2tp-VPN (xl2tpd), my wireless network (usb-wifi) becomes offline. Is there any reason for that?
If I use wired connection, l2tp connects successfully and network works.
Code:
xbian@xbian ~ $ sudo ifconfig
eth0      Link encap:Ethernet  HWaddr b8:27:eb:17:b2:8b  
          inet addr:192.168.1.108  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:180227 errors:0 dropped:0 overruns:0 frame:0
          TX packets:179018 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:71903417 (68.5 MiB)  TX bytes:49917956 (47.6 MiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:14 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1404 (1.3 KiB)  TX bytes:1404 (1.3 KiB)

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:172.22.24.9  P-t-P:172.22.24.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:14 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:670 (670.0 B)  TX bytes:70 (70.0 B)

wlan0     Link encap:Ethernet  HWaddr 6c:fd:b9:60:60:b4  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:611 errors:0 dropped:1 overruns:0 frame:0
          TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:75676 (73.9 KiB)  TX bytes:6454 (6.3 KiB)
Code:
xbian@xbian ~ $ sudo cat /etc/network/interfaces
auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual

wpa-roam /etc/wpa_supplicant/wpa-roam.conf

iface default inet dhcp
xbian@xbian ~ $ sudo cat /etc/wpa_supplicant/wpa-roam.conf
update_config=1

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

network={
        ssid="wifi"
        psk="pass"
        id_str="home"
}
xl2tpd config
Code:
[global]
access control = yes

[lac sevstar]
lns = vpn.com
autodial = yes
redial = yes
redial timeout = 3
require authentication = no
ppp debug = no
pppoptfile = /etc/ppp/options.xl2tpd
/etc/ppp/options.xl2tpd
Code:
xbian@xbian ~ $ sudo cat /etc/ppp/options.xl2tpd
lock
noauth

nobsdcomp
nodeflate
noaccomp

refuse-eap
refuse-pap
refuse-chap
nomppe

mru 1500
mtu 1500

nopersist
maxfail 0
defaultroute

name login
password pass



RE: Trouble with PPTP or L2TP VPN connection - mk01 - 30th Sep, 2013 01:10 PM

@kraleksandr

i'm not really sure "hotplug and manual" is working combo or something the core debian scripts would expect to be. what I should imagine from this is that you want to provide WIFI as interface for incoming vpn tunnels ?

if you plan to run wifi as wlan0 with no address at all still you need to do UP / DOWN in interface. below wlan manual put
" pre-up ifconfig $IFACE up
post-down ifconfig $IFACE down"

if eth0 is used, put it also under auto stanza like "auto lo" is.
in Wheezy with sysvinit it was due to some bugs allowed and working, with convert to upstart - or Beta2 later, it won't work as it is not correct and eth0 will be skipped during boot (configured lates with started networking).

try with the pre-up down whether it helps.


RE: Trouble with PPTP or L2TP VPN connection - kraleksandr - 1st Oct, 2013 02:14 AM

I forgot about this topic, sorry.
Now everything works, after changing /etc/network/interfaces to
Code:
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "wifi"
wpa-psk "pass"
iface default inet dhcp



RE: Trouble with PPTP or L2TP VPN connection - mk01 - 1st Oct, 2013 02:47 AM

haven't seen it earlier. Thanks for feedback.