Answer the question
In order to leave comments, you need to log in
OpenVPN: why is the PtP address not being pinged?
I wanted to deal with OpenVPN.
I generated certificates, set up the server using the default config that comes with OpenVPN, the tun interface is up and everything seems to be working, but I can’t understand why it works like this.
The bottom line is this: in the server config there is a directive " server 172.31.1.0 255.255.255.0 " when the server starts, the following interface will rise:
~$ ip addr list tun0
24: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
link/none
inet 172.31.1.1 peer 172.31.1.2/32 scope global tun0
valid_lft forever preferred_lft forever
~$
~$ ip addr list tun0
23: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 100
link/none
inet 172.31.1.6 peer 172.31.1.5/32 scope global tun0
~$
~$ ip addr list tun0
23: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 100
link/none
inet 172.16.1.29 peer 172.16.1.30/32 scope global tun0
~$
Answer the question
In order to leave comments, you need to log in
Thanks, @ValdikSS
Yes, topology is what you need (and even better it turned out to be possible to assign tun to interface IP 172.30.1.1/24). What an inconspicuous option, for some reason I haven’t seen it before, but I don’t know what to look for in the documentation, you won’t either ... I
found out that the developers recommend using subnet topology , but do not assign it by default for backward compatibility, the default is just a confusing way of cutting into /30 subnets. In order for the peer address to be pinged, topology ptp should be used , then an authentic tunnel will be obtained.
Here is the actual interface on the server:
~$ ip addr list dev tun1
45: tun1: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
link/none
inet 172.30.1.1/24 brd 172.30.1.255 scope global tun1
valid_lft forever preferred_lft forever
~$
~$ ip addr list dev tun1
32: tun1: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 100
link/none
inet 172.30.1.2/24 brd 172.30.1.255 scope global tun1
~$
172.31.1.1 via 172.31.1.5 dev tun0
172.31.1.5 dev tun0 proto kernel scope link src 172.31.1.6
172.30.1.0/24 dev tun1 proto kernel scope link src 172.30.1.2
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question