Hello, I have a problem and I have been looking for a solution for 3 days, I hope someone can help me.
I'm trying to test the Android ToyVpn example, but I'm not succeeding in the server settings. The server file informs several IPs for modification but I do not know how to configure it.
My work environment is as follows:
I have a VPS server where you are running Ubuntu, it is where I want to install the server. In the ifconfig
settings I have the following settings:
IP interno 10.0.239.17
Bcast 10.0.255.255
Mask 255.255.0.0
My public VPS IP is 54.174.69.244
.
I have already disabled VPS Firewall for testing, but to no avail. When I try to connect through the Android client, I get the following message on the server:
tun0: Here comes a new tunnel
and then the message:
tun0: The tunnel is broken
and I can not connect to the VPN server.
Here is the tutorial with the commands inside the android example.
// # Enable IP forwarding
// echo 1 > /proc/sys/net/ipv4/ip_forward
//
// # Pick a range of private addresses and perform NAT over eth0.
// iptables -t nat -A POSTROUTING -s 10.0.0.0/8 -o eth0 -j MASQUERADE
//
// # Create a TUN interface.
// ip tuntap add dev tun0 mode tun
//
// # Set the addresses and bring up the interface.
// ifconfig tun0 10.0.0.1 dstaddr 10.0.0.2 up
//
// # Create a server on port 8000 with shared secret "test".
// ./ToyVpnServer tun0 8000 test -m 1400 -a 10.0.0.2 32 -d 8.8.8.8 -r 0.0.0.0 0