I am attempting to get hanstunnel (IP over ICMP) to work on my VPS

I have:

  • Ubuntu 16 VPS with:
    • ens3 a.b.c.d (external ip)
    • tun0
  • Ubuntu 16 VirtualBox with:
    • enp0s3
    • tun0

VPS is running:

sudo sysctl net.ipv4.icmp_echo_ignore_all=1
sysctl -w net.ipv4.ip_forward=1
sudo hans -r -s -u hans -p supersecurepassword -d tun0

VM is running:

sudo hans -r -c a.b.c.d -p supersecurepassword

I can:

  • ping a.b.c.d from vm (using VPS's external address)
  • connect hans (both client and server agree they are connected)

Doesnt work:

  • ping VPS( from VM( tcpdump on VPS says ping is being recieved and responded to but VM never gets responce
  • ping VM( from VPS( tcpdump on VPS says ping is being sent but VM never receives anything

route -v on both devices has the following entry:        *        U     0      0        0 tun0

I am fairly certain the issue is on the VPS and could have something to do with how traffic on tun0 is being handled. This could be an issue with iptables (of which I am a complete novice).

I am looking for advice on how to further troubleshoot this issue and/or thoughts on what may be wrong with my setup.

  • What are you monitoring with tcpdump? Are you watching the tun interface, or the Ethernet interface? If you monitor the Ethernet interface do you see the VPN traffic when attempting to ping? Have you looked to see if this 'hans' VPN software has any debug or highly verbose mode that could give you more information?
    – Zoredache
    Jan 17 '18 at 22:07
  • -vf runs hans in forground in verbose mode ... it simply says VM has connected w/ DHCP address ... I am running tcpdump on both tun0 and ens3 of the VPS ... it shows ping from VM as well as responce to VM on both interfaces Jan 17 '18 at 22:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.