"No Route to Host"

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
athetius
OpenVpn Newbie
Posts: 1
Joined: Mon Feb 25, 2013 4:36 pm

"No Route to Host"

Post by athetius » Mon Feb 25, 2013 4:49 pm

Hello, I am not sure if this is where to ask about errors with the iOS application, I trust that someone will redirect me or an admin will move this thread.

I am hosting an OpenVPN server, of which I can connect to perfectly with my Linux Laptop using the same config as the iOS's and is behind the same router, this is in all honesty confusing to me. I am using the iOS OpenVPN connect application.

Note: When the iOS trys to connect the openvpn.log doesn't add any information, it doesn't know the iPad tried to connect.

client.ovpn

Code: Select all

client

dev tun

proto udp

remote hhcnashville.com 1194

resolv-retry infinite

nobind

persist-key
persist-tun

ns-cert-type server

verb 3

<ca>
--snip--
</ca>
<cert>
--snip--
</cert>
<key>
--snip--
</key>
iOS error log:

Code: Select all

2013-02-25 10:25:25 ----- OpenVPN Start -----
2013-02-25 10:25:25 EVENT: RESOLVE
2013-02-25 10:25:25 EVENT: WAIT
2013-02-25 10:25:25 EVENT: DISCONNECTED
2013-02-25 10:25:25 EVENT: CORE_ERROR connect: No route to host [ERR]
2013-02-25 10:25:25 Raw stats on disconnect:
2013-02-25 10:25:25 Performance stats on disconnect:
  CPU usage (microseconds): 11622
  Network bytes per CPU second: 0
  Tunnel bytes per CPU second: 0
2013-02-25 10:25:25 ----- OpenVPN Stop -----
2013-02-25 10:25:25 EVENT: DISCONNECT_PENDING
2013-02-25 10:30:50 ----- OpenVPN Start -----
2013-02-25 10:30:50 EVENT: RESOLVE
2013-02-25 10:30:50 EVENT: WAIT
2013-02-25 10:30:50 EVENT: DISCONNECTED
2013-02-25 10:30:50 EVENT: CORE_ERROR connect: No route to host [ERR]
2013-02-25 10:30:50 Raw stats on disconnect:
2013-02-25 10:30:50 Performance stats on disconnect:
  CPU usage (microseconds): 15704
  Network bytes per CPU second: 0
  Tunnel bytes per CPU second: 0
2013-02-25 10:30:50 ----- OpenVPN Stop -----
2013-02-25 10:30:50 EVENT: DISCONNECT_PENDING
server.conf:

Code: Select all

port 1194

proto udp

dev tun

ca ca.crt
cert server.crt
key server.key  
 
dh dh1024.pem

server 10.8.0.0 255.255.255.0

ifconfig-pool-persist ipp.txt

push "redirect-gateway local def1"

push "dhcp-option DNS 10.8.0.1"

client-to-client

keepalive 10 120

persist-key
persist-tun

status openvpn-status.log

verb 3
and finally my iptables:

Code: Select all

iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT

iptables -A INPUT -p tcp -m multiport --destination-ports 22,80,443,1194,1723,6667,6668,7000 -j ACCEPT
iptables -A INPUT -p udp -m multiport --destination-ports 22,80,443,761,1194,1723,6667,6668,7000 -j ACCEPT
iptables -A INPUT -p icmp --icmp-type 8 -j ACCEPT
iptables -A INPUT -p icmp --icmp-type 0 -j ACCEPT
iptables -A FORWARD -p icmp --icmp-type 8 -j ACCEPT
iptables -A FORWARD -p icmp --icmp-type 0 -j ACCEPT

iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT

iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT
iptables -A INPUT -s 10.8.0.0/24 -j ACCEPT
iptables -A FORWARD -j REJECT
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

iphoting
OpenVpn Newbie
Posts: 18
Joined: Thu Apr 04, 2013 8:24 am

Re: "No Route to Host"

Post by iphoting » Thu Apr 04, 2013 8:25 am

I have the exact same error and I am at a loss.

"No route to host" makes no sense at all.

iphoting
OpenVpn Newbie
Posts: 18
Joined: Thu Apr 04, 2013 8:24 am

Re: "No Route to Host"

Post by iphoting » Thu Apr 04, 2013 8:53 am

As a follow-up. Hardcoding IP address in place of the hostname in the remote parameter "fixes"/avoids this problem.

Post Reply