Is there a reserved address for routing?

This forum is for admins who are looking to build or expand their OpenVPN setup.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
ajhlinuxuser
OpenVpn Newbie
Posts: 6
Joined: Tue Sep 26, 2017 8:16 pm

Is there a reserved address for routing?

Post by ajhlinuxuser » Tue Sep 26, 2017 8:44 pm

Hi there, first post on this forum. I am a Linux user, and this question is about OpenVPN running on a Linux server.

I have set up a VPN where one of my clients has a LAN behind it. I can reach the LAN fine - and as far as I can tell, everything is working. But there is this one strange IP address in the routing table of my server that is not making sense.

First, here is a quick diagram of my VPN setup:

Code: Select all

server 10.8.0.1
 |
 + client 10.8.0.2
 |
 + client 10.8.0.3
 |
 + client-with-lan 10.8.0.4 <--->[LAN 192.168.100.0/24]
 |
 + client 10.8.0.5

Now here is the routing table of the OpenVPN server:

Code: Select all

$ route -n
Kernel IP routing table
Destination	Gateway		Genmask		Flags	Metric	Ref	Use Iface
0.0.0.0		88.88.88.1		0.0.0.0		UG		0		0	0 eth0
10.8.0.0		0.0.0.0		255.255.255.0	U		0		0	0 tun0
88.88.88.0		0.0.0.0		255.255.255.0	U		0		0	0 eth0
192.168.100.0    10.8.0.2		255.255.255.0	UG		0		0	0 tun0

I see the last line, which appears to route traffic for the 192.168.100.0 network to 10.8.0.2, yet that is the address of a client which does NOT have any LAN behind it. From the server and from other clients, when i try to connect to 10.8.0.2, I successfully connect to the client that I wanted to connect to. And I have confirmed that I can reach the systems in the 10.8.0.4 client's LAN. The routing is behaving correctly - routing to 10.8.0.4, but the routing table isn't showing that. Because if it was actually routing to 10.8.0.2, I would never reach the LAN.

So my question is, why does it show 10.8.0.2 as the gateway to my LAN? Is this intentional? Should I treat that address as "reserved" and re-assign my client to another IP address? Or is everything going to be ok?

Thanks.

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 5737
Joined: Fri Jun 03, 2016 1:17 pm

Re: Is there a reserved address for routing?

Post by TinCanTech » Tue Sep 26, 2017 8:54 pm

ajhlinuxuser wrote:
Tue Sep 26, 2017 8:44 pm
So my question is, why does it show 10.8.0.2 as the gateway to my LAN?
10.8.0.2 is the gateway to the remote LAN from the server side in the routing table.

Openvpn uses --iroute (as I presume you understand) to maintain an internal routing table for the VPN.

ajhlinuxuser
OpenVpn Newbie
Posts: 6
Joined: Tue Sep 26, 2017 8:16 pm

Re: Is there a reserved address for routing?

Post by ajhlinuxuser » Fri Jan 11, 2019 1:57 pm

Sorry for not replying back then. I did not realize there was an internal routing table. I actually thought that the term "iroute" consisted of "I route" as in "I think, therefore i am."

Thanks for helping me get started. I have continued to learn a lot through 2018, mostly via the IRC channel.

Post Reply