zehome / MLVPN

Multi-link VPN (ADSL/SDSL/xDSL/Network aggregation / bonding)
http://www.mlvpn.fr/
BSD 2-Clause "Simplified" License
521 stars 127 forks source link

[Warn/dns] getaddrinfo(,5080) failed: Unknown error #75

Open paketecuento opened 8 years ago

paketecuento commented 8 years ago

hi, I installed MLVPN from source in debian jessie. Launched server side and get:

root@debian:/etc/mlvpn# mlvpn --user mlvpn -c /etc/mlvpn/mlvpn0.conf --debug -Dprotocol -vvvvvv
2016-06-21T23:12:37 [ DBG] absolute maximum mtu: 1444
2016-06-21T23:12:37 [INFO/config] new password set
2016-06-21T23:12:37 [INFO/config] reorder_buffer_size changed from 0 to 64
2016-06-21T23:12:37 [INFO/config] ppp0 tunnel added
2016-06-21T23:12:37 [INFO/config] ppp1 tunnel added
2016-06-21T23:12:37 [INFO] created interface `mlvpn0'
2016-06-21T23:12:37 [WARN/dns] ppp0 getaddrinfo(,5080) failed: Unknown error
2016-06-21T23:12:37 [WARN/dns] ppp1 getaddrinfo(,5081) failed: Unknown error
2016-06-21T23:12:38 [WARN/dns] ppp0 getaddrinfo(,5080) failed: Unknown error
2016-06-21T23:12:38 [WARN/dns] ppp1 getaddrinfo(,5081) failed: Unknown error
2016-06-21T23:12:39 [WARN/dns] ppp0 getaddrinfo(,5080) failed: Unknown error
2016-06-21T23:12:39 [WARN/dns] ppp1 getaddrinfo(,5081) failed: Unknown error
2016-06-21T23:12:40 [WARN/dns] ppp1 getaddrinfo(,5081) failed: Unknown error
2016-06-21T23:12:40 [WARN/dns] ppp0 getaddrinfo(,5080) failed: Unknown error

Maybe related with DNS?? my resolv.conf is 8.8.8.8

thank you

[EDIT]: ok, need to add bindhost="0.0.0.0" and avoid this WARN. In any case I cannot go ahead from

root@debian:/etc/mlvpn# mlvpn -v  --user mlvpn -c /etc/mlvpn/mlvpn0.conf --debug -Dprotocol
2016-06-22T00:22:01 [ DBG] absolute maximum mtu: 1444
2016-06-22T00:22:01 [INFO/config] new password set
2016-06-22T00:22:01 [INFO/config] reorder_buffer_size changed from 0 to 64
2016-06-22T00:22:01 [INFO/config] ppp0 tunnel added
2016-06-22T00:22:01 [INFO/config] ppp1 tunnel added
2016-06-22T00:22:01 [INFO] created interface `mlvpn0'
2016-06-22T00:22:01 [INFO] ppp0 bind to 0.0.0.0
2016-06-22T00:22:01 [INFO] ppp1 bind to 0.0.0.0

and no IP assigned for mlvpn0

root@debian:/etc/mlvpn# ifconfig mlvpn0
mlvpn0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          POINTOPOINT NOARP MULTICAST  MTU:1444  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
zehome commented 8 years ago

the interface has a 1444 mtu so mlvpn_updown.sh is executed. Maybe you have a bug in your .conf not setting "ip4" and "ip4_gateway" ?

BTW, if you are doing linux <-> linux tunnel you don't need addresses on the tunnel do enable routing.

paketecuento commented 8 years ago

Thank you for your reply. This is a very strange situation for me. I've checked MLVPN with Ubuntu 15.10, ubuntu 15.04, Debian 8, Debian 7 and CentOS 7. All failing :(

For the server, this is my mlvpn0.conf

[general]
statuscommand  = "/etc/mlvpn/mlvpn0_updown.sh"
tuntap = "tun"
loglevel = 2
mode = "server"
interface_name = "mlvpn0"
timeout = 30
password = "pacopaco"
cleartext_data = 0

[ppp0]
bindport = 5080
bindhost = "0.0.0.0"

[ppp1]
bindport = 5081
bindhost = "0.0.0.0"

and this is my mlvpn0_updown.sh:

 #!/bin/bash

error=0; trap "error=$((error|1))" ERR
tuntap_intf="$1"
newstatus="$2"
rtun="$3"
[ -z "$newstatus" ] && exit 1
(
if [ "$newstatus" = "tuntap_up" ]; then
 echo "$tuntap_intf setup"
 /sbin/ifconfig $tuntap_intf 10.42.42.1 netmask 255.255.255.252 mtu 1400 up
 /sbin/iptables -t nat -A POSTROUTING -o eth0 -s 10.42.42.0/30 -j MASQUERADE
elif [ "$newstatus" = "tuntap_down" ]; then
 /sbin/iptables -t nat -D POSTROUTING -o eth0 -s 10.42.42.0/30 -j MASQUERADE
fi
) >> /var/log/mlvpn_commands.log 2>&1
exit $errors

I did no copy&paste anything (I've just type by hand) in order to avoid any hidden char. About "ip4" and "ip4_gateway", I did not find any info in the docs. Is this a new feature?

Note:

root@odroidc2:/etc/mlvpn# ls -la
total 16
drwxr-xr-x  2 root root 4096 jun 27 15:45 .
drwxr-xr-x 86 root root 4096 jun 27 15:38 ..
-rw-------  1 root root  272 jun 27 15:40 mlvpn0.conf
-rwx------  1 root root  521 jun 27 15:45 mlvpn0_updown.sh

regards,

zehome commented 8 years ago

Use the template configuration files in /usr/share/doc/mlvpn/examples

zehome commented 8 years ago

(and the mlvpn_updown.sh script too, in examples/)

paketecuento commented 8 years ago

I already used them, but no luck :(. Also note that in Debian jessie 8 I have:

root@odroidc2:/etc/mlvpn# mlvpn --user mlvpn -c mlvpn.conf -vvvvv --debug -Dprotocol
mlvpn: unable to chroot: No such file or directory

/run/mlvpn (and /var/run/mlvpn via symbolic link) already exists. I can only make it start with:

root@odroidc2:/etc/mlvpn# mlvpn --user root -c mlvpn.conf -vvvvv --debug -Dprotocol
2016-06-27T16:01:23 [ DBG] absolute maximum mtu: 1444
2016-06-27T16:01:23 [INFO/config] new password set
2016-06-27T16:01:23 [INFO/config] dsl1 tunnel added
2016-06-27T16:01:23 [INFO/config] dsl2 tunnel added
2016-06-27T16:01:23 [INFO] created interface `mlvpn0'
2016-06-27T16:01:23 [INFO] dsl1 bind to 0.0.0.0
2016-06-27T16:01:23 [INFO] dsl2 bind to 0.0.0.0
paketecuento commented 8 years ago

my problem looks very similar to #56