NFS+OpenVPN [EHOSTUNREACH]: No route to host

Discussion in 'Server Operation' started by Mark_NL, Aug 3, 2009.

  1. Mark_NL

    Mark_NL New Member

    I'm working on a setup where i want to set up a vpn between 2 servers.

    Server A: Ubuntu 8.04 (1.2.3.4)
    Server B: Debian Etch (5.6.7.8)

    Both servers have an public IP and have no problems reaching everything that is connected to the internet.

    configuration is as followed:

    Server A:
    /etc/openvpn/tun0.conf
    Code:
    dev tun0
    ifconfig 172.16.0.1 172.16.0.2
    secret /etc/openvpn/static.key
    Server B:
    Code:
    remote 1.2.3.4
    dev tun0
    ifconfig 172.16.0.2 172.16.0.1
    secret /etc/openvpn/static.key
    then on both servers i run:
    Code:
    /etc/init.d/openvpn start
    and i tail the syslogs on both:
    Server A:
    Code:
    Mon Aug  3 13:17:45 2009 OpenVPN 2.1_rc11 i486-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Oct 15 2008
    Mon Aug  3 13:17:45 2009 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA.  OpenVPN 2.0-beta16 and earlier used 5000 as the default port.
    Mon Aug  3 13:17:45 2009 /usr/sbin/openvpn-vulnkey -q /etc/openvpn/static.key
    Mon Aug  3 13:17:45 2009 TUN/TAP device tun0 opened
    Mon Aug  3 13:17:45 2009 /sbin/ifconfig tun0 172.16.0.1 pointopoint 172.16.0.2 mtu 1500
    Mon Aug  3 13:17:45 2009 UDPv4 link local (bound): [undef]:1194
    Mon Aug  3 13:17:45 2009 UDPv4 link remote: [undef]:1194
    Mon Aug  3 13:17:55 2009 Peer Connection Initiated with 5.6.7.8:1194
    Mon Aug  3 13:17:56 2009 Initialization Sequence Completed
    Server B:
    Code:
    Mon Aug  3 13:15:13 2009 OpenVPN 2.0.9 i486-pc-linux-gnu [SSL] [LZO] [EPOLL] built on Sep 20 2007
    Mon Aug  3 13:15:13 2009 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA.  OpenVPN 2.0-beta16 and earlier used 5000 as the default port.
    Mon Aug  3 13:15:13 2009 TUN/TAP device tun0 opened
    Mon Aug  3 13:15:13 2009 ifconfig tun0 172.16.0.2 pointopoint 172.16.0.1 mtu 1500
    Mon Aug  3 13:15:13 2009 UDPv4 link local (bound): [undef]:1194
    Mon Aug  3 13:15:13 2009 UDPv4 link remote: 1.2.3.4:1194
    Mon Aug  3 13:15:23 2009 Peer Connection Initiated with 1.2.3.4:1194
    Mon Aug  3 13:15:25 2009 Initialization Sequence Completed
    well so far so good .. i can ping 172.16.0.1 and 172.16.0.2 on both machines.
    now here it comes:

    when i mount an nfs mount on server B and ls the folder i get this on server A:
    Code:
    Aug  3 13:20:52 filer40t mountd[6538]: authenticated mount request from 172.16.0.2:795 for /data/vol1 (/data/vol1)
    Code:
    Mon Aug  3 13:21:10 2009 read UDPv4 [EHOSTUNREACH]: No route to host (code=113)
    Mon Aug  3 13:21:12 2009 read UDPv4 [EHOSTUNREACH|EHOSTUNREACH]: No route to host (code=113)
    those keep repeating until i stop the ls on server b.

    there are no firewall rules on both machines, during the errors i can still ping both ways. i can open a shell from server B to server A through the vpn.

    i've searched everywhere and cannot find what the problem seems to be :(

    any help is much appreciated.
     
  2. Mark_NL

    Mark_NL New Member

    oke, problem solved ..

    I'll leave this post here for when someone else might have the same problem:

    added proto tcp-server on server a and proto tcp-client on server b in the config files.

    weird thing was, that the first time when i turned everythin on, it worked fine.
     

Share This Page