trideep wrote
I am currently learning to setup openvpn and the book that I am using is "Mastering OpenVPN". Anyway, I am stuck at p2p topology topic where the book seems to say that p2p topology was the default topology until subnet arrived, and that it lets two nodes connect each other over a vpn tunnel. The ifconfig parameters at the two nodes are identical but opposite, which I totally understand.
But the confusion stems from the openvpn wiki topic on Concepts-Addressing
https://community.openvpn.net/openvpn/wiki/Concepts-Addressing at the second last example (the /24 subnet). I don't exactly understand:
1. How come the server ifconfig parameters have remote endpoint different from client local?
2. How come the tunnel establish two way communication inside the tunnel with server remote endpoint set to 10.8.0.255?
Well, p2p is a --mode argument, not a --topology. The other mode is "server" and --mode server has --topology. The p2p mode is a point-to-point connection.
The --ifconfig for p2p specifies the two endpoints. They can be any address, adjacent or otherwise. You get a point-to-point link where one peer is one of those addresses, and the other peer is the other. And the addresses are the same, but the order is reversed, on the other peer. You say you understand that.
But then you are getting confused with --mode server stuff. In server mode, --ifconfig has a different meaning. The link you are confused about is
only for server/client mode. Disregard it if you are playing with p2p mode.
In server mode with "--topology subnet", the first argument to --ifconfig is the server address; the second argument is the netmask (such as 255.255.255.0 for a /24 subnet.) Normally this would be provided as part of the --server macro.
With "--topology net30" --ifconfig is different yet again. But I am not going to bother to explain it, and suggest instead that you do not bother to learn about that. Let net30 rest in peace. 🙂
Remember that searching the man page is much easier when you use the leading "--" before any option/setting.
Hope this helps; regards, rob0