Hi all,
I'm trying to setup my Pi to allow to VPN to my home network when I'm away from it.
I'm using a Model B with the latest arch arm release updated
Basically I've followed these tutorials to some degree:
https://smileykeith.com/2014/01/27/ipse ... rch-linux/
http://linux.tips/tutorials/how-to-setu ... spberry-pi
When I restart the pi, the xlt2pd service doesn't seem to autostart even though I have this running:
chmod +x /usr/local/bin/vpn-boot.sh
for
/etc/systemd/system/vpnboot.service
$this->bbcode_second_pass_code('', '[Unit]
Description=VPN Settings at boot
After=netctl@eth0.service
Before=openswan.service xl2tpd.service
[Service]
ExecStart=/usr/local/bin/vpn-boot.sh
[Install]
WantedBy=multi-user.target')
The output of:
systemctl restart openswan
systemctl status openswan
$this->bbcode_second_pass_code('', '
â openswan.service - Openswan daemon
Loaded: loaded (/usr/lib/systemd/system/openswan.service; enabled)
Active: active (running) since Wed 2014-08-13 20:53:31 BST; 3s ago
Process: 799 ExecStop=/usr/lib/systemd/scripts/ipsec --stop (code=exited, status=0/SUCCESS)
Process: 873 ExecStart=/usr/lib/systemd/scripts/ipsec --start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/openswan.service
ââ 966 /bin/sh /usr/lib/ipsec/_plutorun --debug --uniqueids yes --force_busy no --nocrsend no --strictcrlpolicy no --nat_traversal yes --keep_alive --protostack netkey --force_keepalive no --disable_port_floating no -...
ââ 967 logger -s -p daemon.error -t ipsec__plutorun
ââ 970 /bin/sh /usr/lib/ipsec/_plutorun --debug --uniqueids yes --force_busy no --nocrsend no --strictcrlpolicy no --nat_traversal yes --keep_alive --protostack netkey --force_keepalive no --disable_port_floating no -...
ââ 971 /bin/sh /usr/lib/ipsec/_plutoload --wait no --post
ââ 972 /usr/lib/openswan/pluto --nofork --secretsfile /etc/ipsec.secrets --ipsecdir /etc/ipsec.d --use-netkey --uniqueids --nat_traversal --virtual_private %v4:192.168.0.0/16,%v4:10.0.0.0/8,%v4:172.16.0.0/12,%v4:25.0....
ââ 975 pluto helper # 0
ââ1110 _pluto_adns
Aug 13 20:53:32 0ri0n pluto[972]: added connection description "L2TP-PSK-noNAT"
Aug 13 20:53:32 0ri0n ipsec__plutorun[967]: 002 added connection description "L2TP-PSK-noNAT"
Aug 13 20:53:32 0ri0n pluto[972]: added connection description "passthrough-for-non-l2tp"
Aug 13 20:53:32 0ri0n ipsec__plutorun[967]: 002 added connection description "passthrough-for-non-l2tp"
Aug 13 20:53:32 0ri0n pluto[972]: listening for IKE messages
Aug 13 20:53:32 0ri0n pluto[972]: adding interface eth0/eth0 192.168.0.14:500
Aug 13 20:53:32 0ri0n pluto[972]: adding interface eth0/eth0 192.168.0.14:4500
Aug 13 20:53:32 0ri0n pluto[972]: adding interface lo/lo 127.0.0.1:500
Aug 13 20:53:32 0ri0n pluto[972]: adding interface lo/lo 127.0.0.1:4500
Aug 13 20:53:32 0ri0n pluto[972]: loading secrets from "/etc/ipsec.secrets"')
The output of:
systemctl restart xl2tpd
systemctl status xl2tpd
$this->bbcode_second_pass_code('', 'â xl2tpd.service - Level 2 Tunnel Protocol Daemon (L2TP)
Loaded: loaded (/usr/lib/systemd/system/xl2tpd.service; enabled)
Active: active (running) since Wed 2014-08-13 20:53:52 BST; 4s ago
Main PID: 1138 (xl2tpd)
CGroup: /system.slice/xl2tpd.service
ââ1138 /usr/bin/xl2tpd -D
Aug 13 20:53:52 0ri0n xl2tpd[1138]: xl2tpd[1138]: Enabling IPsec SAref processing for L2TP transport mode SAs
Aug 13 20:53:52 0ri0n xl2tpd[1138]: xl2tpd[1138]: IPsec SAref does not work with L2TP kernel mode yet, enabling force userspace=yes
Aug 13 20:53:52 0ri0n xl2tpd[1138]: xl2tpd[1138]: setsockopt recvref[30]: Protocol not available
Aug 13 20:53:52 0ri0n xl2tpd[1138]: xl2tpd[1138]: Not looking for kernel support.
Aug 13 20:53:52 0ri0n xl2tpd[1138]: xl2tpd[1138]: xl2tpd version xl2tpd-1.3.6 started on 0ri0n PID:1138
Aug 13 20:53:52 0ri0n xl2tpd[1138]: xl2tpd[1138]: Written by Mark Spencer, Copyright (C) 1998, Adtran, Inc.
Aug 13 20:53:52 0ri0n xl2tpd[1138]: xl2tpd[1138]: Forked by Scott Balmos and David Stipp, (C) 2001
Aug 13 20:53:52 0ri0n xl2tpd[1138]: xl2tpd[1138]: Inherited by Jeff McAdams, (C) 2002
Aug 13 20:53:52 0ri0n xl2tpd[1138]: xl2tpd[1138]: Forked again by Xelerance (www.xelerance.com) (C) 2006
Aug 13 20:53:52 0ri0n xl2tpd[1138]: xl2tpd[1138]: Listening on IP address 192.168.0.14, port 1701')
The output of:
ipsec verify
$this->bbcode_second_pass_code('', 'Checking if IPsec got installed and started correctly:
Version check and ipsec on-path [OK]
Openswan U2.6.41/K3.12.26-1-ARCH (netkey)
See `ipsec --copyright' for copyright information.
Checking for IPsec support in kernel [OK]
NETKEY: Testing XFRM related proc values
ICMP default/send_redirects [OK]
ICMP default/accept_redirects [OK]
XFRM larval drop [OK]
Hardware random device check [N/A]
Two or more interfaces found, checking IP forwarding [OK]
Checking rp_filter [OK]
Checking that pluto is running [OK]
Pluto listening for IKE on udp 500 [FAILED]
Pluto listening for IKE on tcp 500 [NOT IMPLEMENTED]
Pluto listening for IKE/NAT-T on udp 4500 [DISABLED]
Pluto listening for IKE/NAT-T on tcp 4500 [NOT IMPLEMENTED]
Pluto listening for IKE on tcp 10000 (cisco) [NOT IMPLEMENTED]
Checking NAT and MASQUERADEing [TEST INCOMPLETE]
Checking 'ip' command [OK]
Checking 'iptables' command [OK]
ipsec verify: encountered errors')
Output of netstat -tulpan:
$this->bbcode_second_pass_code('', 'Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 180/sshd
tcp 0 0 192.168.0.14:22 192.168.0.4:50657 ESTABLISHED 759/sshd: pi [priv]
tcp 0 0 192.168.0.14:22 5.9.18.243:2192 ESTABLISHED 752/sshd: root
tcp 0 0 192.168.0.14:22 188.40.84.10:2403 ESTABLISHED 770/sshd: root
tcp 0 0 192.168.0.14:22 176.9.47.75:4114 ESTABLISHED 1167/sshd: root
udp 0 0 127.0.0.1:4500 0.0.0.0:* 972/pluto
udp 0 0 192.168.0.14:4500 0.0.0.0:* 972/pluto
udp 0 0 192.168.0.14:1701 0.0.0.0:* 1138/xl2tpd
udp 0 0 0.0.0.0:5353 0.0.0.0:* 156/avahi-daemon: r
udp 0 0 127.0.0.1:500 0.0.0.0:* 972/pluto
udp 0 0 192.168.0.14:500 0.0.0.0:* 972/pluto
udp 0 0 0.0.0.0:48932 0.0.0.0:* 156/avahi-daemon: r
udp 0 0 0.0.0.0:68 0.0.0.0:* 736/dhcpcd
udp 0 0 0.0.0.0:68 0.0.0.0:* 727/dhcpcd ')