To start, do the following:
1. Edit /etc/apt/sources.list and add the following below
Code: Select all
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
2. Then apt-get update. At his point, it may ask you to restart a variety of services that are already installed on your Pi. In that case, select the option to restart services without prompting you, because it's going to restart a lot of services.
3. When it's done, install strongswan 5.2.1 with the following:
Code: Select all
apt-get install -t jessie strongswan
Code: Select all
apt-get install -t jessie libcharon-extra-plugins
Code: Select all
config setup
cachecrls=yes
uniqueids=yes
conn ios
keyexchange=ikev1
authby=xauthpsk
xauth=server
left=%defaultroute
leftsubnet=0.0.0.0/0
leftfirewall=yes
right=%any
rightsubnet=10.0.0.0/24
rightsourceip=10.0.0.2/24
rightdns=4.2.2.1
auto=add
Save and exit
6. Edit /etc/ipsec.secrets and add the following at the end of the file
Code: Select all
YOUR MACHINES IP ADDRESS %any : PSK "YOUR PRE-SHARED KEY HERE"
user1 : XAUTH "YOUR PASSWORD HERE"
user2 : XAUTH "YOUR PASSWORD HERE"
user3 : XAUTH "YOUR PASSWORD HERE"
user4 : XAUTH "YOUR PASSWORD HERE"
user5 : XAUTH "YOUR PASSWORD HERE"
7. Edit /etc/sysctl.conf and find this line
Code: Select all
# Uncomment the next line to enable packet forwarding for IPv4
Code: Select all
net.ipv4.ip_forward=1
Save and exit
8. Type sysctl -p
9. Edit /etc/rc.local and add the following to the bottom, before exit0
Code: Select all
# VPN NAT
/sbin/iptables -t nat -A POSTROUTING -s 10.0.0.0/8 -o eth0 -j MASQUERADE
9. Type the following:
update-rc.d -f ipsec remove
Hit Enter, then type
update-rc.d -f ipsec start 41 2 3 4 5 . stop 91 1 . start 34 0 6 .
Hit Enter.
10. Afterwards, return to /etc/apt/sources.list and comment out/remove the following below
Code: Select all
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
From here, your machine should reboot with strongswan up and running.
If there's someone out there who can help solve the issue with Android connections, the help would be much appreciated.