3

I have a Ubuntu server and would like to run my own VPN on it that will be connectable using nothing but the built-in android VPN (no apps)

0

1 Answer 1

1

You might check into an L2TP server. I found some additional steps beyond what was given in that link:

After setting /etc/ipsec.secrets, run the following commands (one per line):

iptables --table nat --append POSTROUTING --jump MASQUERADE
echo "net.ipv4.ip_forward = 1" |  tee -a /etc/sysctl.conf
echo "net.ipv4.conf.all.accept_redirects = 0" |  tee -a /etc/sysctl.conf
echo "net.ipv4.conf.all.send_redirects = 0" |  tee -a /etc/sysctl.conf
for vpn in /proc/sys/net/ipv4/conf/*; do echo 0 > $vpn/accept_redirects; echo 0 > $vpn/send_redirects; done
sysctl -p

Copy to /etc/rc.local before 'exit 0':

for vpn in /proc/sys/net/ipv4/conf/*; do echo 0 > $vpn/accept_redirects; echo 0 > $vpn/send_redirects; done
iptables --table nat --append POSTROUTING --jump MASQUERADE

Hang onto the pre-shared key you entered into /etc/ipsec.secrets - that's the one you'll need to enter into the VPN setup.

NB I haven't tried this on my Nexus tablet - connecting from home to home doesn't work well...but it works just fine on my iPhone and the instructions on that page have a set for Android, so I assume it should work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .