0

I try to set up a connection over the internet between two ipfire routers, having OpenVPN installed on both. r3 is the server, r1 the client.

It almost works. First, the "server" is started: here are what i think are the most relevant log lines:

Jul  5 18:44:24 r3 openvpnserver[23717]: OpenVPN 2.3.18 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Nov  3 2017
Jul  5 18:44:24 r3 openvpnserver[23717]: library versions: OpenSSL 1.0.2m  2 Nov 2017, LZO 2.09
[...]
Jul  5 18:44:24 r3 openvpnserver[23718]: TUN/TAP device tun0 opened
Jul  5 18:44:24 r3 openvpnserver[23718]: TUN/TAP TX queue length set to 100
[...]
Jul  5 18:44:24 r3 openvpnserver[23718]: /sbin/ip link set dev tun0 up mtu 1400
Jul  5 18:44:24 r3 openvpnserver[23718]: /sbin/ip addr add dev tun0 local 10.0.13.1 peer 10.0.13.2
Jul  5 18:44:24 r3 openvpnserver[23718]: /sbin/ip route add 10.0.13.0/24 via 10.0.13.2
[...]
Jul  5 18:44:24 r3 openvpnserver[23718]: Listening for incoming TCP connection on [undef]
Jul  5 18:44:24 r3 openvpnserver[23718]: TCPv4_SERVER link local (bound): [undef]
Jul  5 18:44:24 r3 openvpnserver[23718]: TCPv4_SERVER link remote: [undef]
Jul  5 18:44:24 r3 openvpnserver[23718]: MULTI: multi_init called, r=256 v=256
Jul  5 18:44:24 r3 openvpnserver[23718]: IFCONFIG POOL: base=10.0.13.4 size=62, ipv6=0
Jul  5 18:44:24 r3 openvpnserver[23718]: MULTI: TCP INIT maxclients=100 maxevents=104
Jul  5 18:44:24 r3 openvpnserver[23718]: Initialization Sequence Completed

The first problem arises : why IFCONFIG POOL: base=10.0.13.4 ? I did not set that anywhere.

Then i start the client on r1 and here the logs on r3 :

Jul  5 19:25:50 r3 openvpnserver[23718]: TCP connection established with [AF_INET]<r1'IP>:1194
[...]
Jul  5 19:25:51 r3 openvpnserver[23718]: <r1'IP>:1194 WARNING: 'ifconfig' is present in remote config but missing in local config, remote='ifconfig 10.0.13.1 10.0.13.2'
[...]
Jul  5 19:25:51 r3 openvpnserver[23718]: r1.FQDN/<r1'IP>:1194 MULTI_sva: pool returned IPv4=10.0.13.6, IPv6=(Not enabled)
Jul  5 19:25:51 r3 openvpnserver[23718]: r1.FQDN/<r1'IP>:1194 MULTI: Learn: 10.0.13.6 -> r1.FQDN/<r1'IP>:1194
Jul  5 19:25:51 r3 openvpnserver[23718]: r1.FQDN/<r1'IP>:1194 MULTI: primary virtual IP for r1.FQDN/<r1'IP>:1194: 10.0.13.6

So i don't get it: base IP is 10.0.13.4 (don't know where it comes from) and now the peer IP is... MULTI_sva: pool returned IPv4=10.0.13.6 ?

At the same the link on tun0 is between 10.0.13.1 and 10.0.13.2.

So routes are broken and despite the fact the connexion is established and authenticated, I can't route the traffic between the two internals subnets (192.168.1.0/24 and .2.0/24 for that matters).

What is wrong ? Shouldn't the IP on both sides of the VPN be 10.0.13.1 and 10.0.13.2 ?

Where do the @IP 13.4 or 13.6 come from ?

0

While i still don't understand where those addresses are coming from, someone on the OpenVPN support forum told me to use the topology subnet option in the config.

The default and NOT RECOMMENDED value of this option (see https://github.com/OpenVPN/openvpn/blob/master/sample/sample-config-files/server.conf) is net30 for the support of some old windows clients.

(Anything relating to windows leads to unexpected results, so i'm not suprised anymore)

Yet IPFire has no option to configure this, so i guess it is supposed to work without that, but that's another question.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.