What to do i same network address layout is used?!

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
cybermailer
OpenVpn Newbie
Posts: 12
Joined: Sat Jul 08, 2017 8:31 pm

What to do i same network address layout is used?!

Post by cybermailer » Fri Jan 24, 2020 12:34 pm

Hi,
i have several network's i.e.
192.168.x.x
40.x.x.x
10.4.x.x

my vpn server assign 10.8.x.x address to clients.
So now i want to use vpn on a 10.4.x.x but this won't work. Is it because it is not allowed to use a 10.x.x.x network?

What can be the simplest way to handle this problem? I can not change the 10.4. address (=no solution).

thx!

User avatar
Pippin
Forum Team
Posts: 589
Joined: Wed Jul 01, 2015 8:03 am

Re: What to do i same network address layout is used?!

Post by Pippin » Fri Jan 24, 2020 7:19 pm


cybermailer
OpenVpn Newbie
Posts: 12
Joined: Sat Jul 08, 2017 8:31 pm

Re: What to do i same network address layout is used?!

Post by cybermailer » Mon Jan 27, 2020 7:46 am

I've red this:
https://openvpn.net/community-resources ... e-subnets/

That means a subnet with 10.8.X.X should not conflict with 10.4.X.X -> OR?

Therefore maybe i have to search if there is a firewall blocking me...

TiTex
OpenVPN Super User
Posts: 288
Joined: Tue Apr 12, 2011 6:22 am

Re: What to do i same network address layout is used?!

Post by TiTex » Mon Jan 27, 2020 9:07 am

The subnet is determined by the subnet mask , but if your subnet mask is not lower than or equal to 12 bits (ie. 255.240.0.0) you're ok ... it's not conflicting

Beside that , should we just guess what your configs look like and answer to your questions based on that ?
If that's the case, you're on your own :)

Pippin pointed out that topic url for a reason

cybermailer
OpenVpn Newbie
Posts: 12
Joined: Sat Jul 08, 2017 8:31 pm

Re: What to do i same network address layout is used?!

Post by cybermailer » Mon Jan 27, 2020 1:06 pm

Oh thx guys. Now i know what's going on. For some reason the client do not uses my dns. It uses the ip from me and my gateway but not my dns...
therefore there was a resolv problem. For shortly fix i added 8.8.8.8 to /etc/resolv.conf and set this file write protected.

Now i have to look whats the problem why my dns is not pushed.

My Server file:

Code: Select all

client-to-client
ca /etc/openvpn/ca.crt
cert /etc/openvpn/vpn-server.crt
dev tun
dh /etc/openvpn/dh2048.pem
keepalive 10 120
key /etc/openvpn/vpn-server.key
port 1194
proto udp
server 10.8.0.0 255.255.255.0
verb 3
push redirect-gateway def1
push dhcp-option DNS 192.168.1.1
push route 192.168.1.0 255.255.255.0
my client looks like:

Code: Select all

dev tun
proto udp

log openvpn.log
verb 3

ca ca.crt
cert client_XXX.crt
key client_XXX.key

client
remote-cert-tls server
remote dyndns.XXXX.at 1194

script-security 2
up /etc/openvpn/update-resolv.conf
down /etc/openvpn/update-resolv.conf
Did i made something wrong hiere?

TiTex
OpenVPN Super User
Posts: 288
Joined: Tue Apr 12, 2011 6:22 am

Re: What to do i same network address layout is used?!

Post by TiTex » Mon Jan 27, 2020 6:22 pm

what linux distribution are you using on your client?

Post Reply