VPN DNS behavior

vpn
dns

(Zimny) #1

Hi there,

All credites to all you work.

Issue
New nethserver installation
kvm plain
bridge network
new vm build
centos 7
ping from vm difremt
[3]+ Stopped ping zimny.org
[root@emby ~]# ping zimny.org
PING zimny.org (192.168.2.200) 56(84) bytes of data.
64 bytes from fr.itprosystems.ltd (192.168.2.200): icmp_seq=1 ttl=63 time=25.4 ms
64 bytes from fr.itprosystems.ltd (192.168.2.200): icmp_seq=2 ttl=63 time=23.3 ms
64 bytes from fr.itprosystems.ltd (192.168.2.200): icmp_seq=3 ttl=63 time=22.5 ms
^Z
[4]+ Stopped ping zimny.org
[root@emby ~]#
[root@emby ~]# ping zimny.org
PING zimny.org (51.255.167.153) 56(84) bytes of data.
64 bytes from fr.itprosystems.ltd (51.255.167.153): icmp_seq=1 ttl=48 time=25.4 ms
64 bytes from fr.itprosystems.ltd (51.255.167.153): icmp_seq=2 ttl=48 time=25.4 ms
64 bytes from fr.itprosystems.ltd (51.255.167.153): icmp_seq=3 ttl=48 time=25.2 ms
64 bytes from fr.itprosystems.ltd (51.255.167.153): icmp_seq=4 ttl=48 time=23.8 ms


(Markus Neuberger) #2

Hi @zimny,

seems like the centos vm uses internal and external DNS which resolves your domain as internal (192…) and external (51…) IP. It depends on which DNS is used.

Do you use Active Directory?
http://docs.nethserver.org/en/v7/accounts.html#dns-and-ad-domain


(Zimny) #3

Hi Markus
Thank you for your reply
Basically this is second install of NS and the same issue
no problem on the host
vm every time then you ping ex.google give different respond one correct google ip and when you stop that ping and ping it again give you this strange behaviour I don’t have any internal networks at 192.168.2.xxxx


(Markus Neuberger) #4

What’s the output of nslookup zimny.org on the vm, just to check which DNS is used?


(Zimny) #5

Hi Markus
Sorry sleepy yesterday

So this is the output on my host:
[root@vps ~]# nslookup zimny.org
Server: 127.0.0.1
Address: 127.0.0.1#53

Name: zimny.org
Address: 192.168.2.200
Name: zimny.org
Address: 51.255.167.153

[root@vps ~]#
surprised because i don’t have 192.168.2.0 network and in my NS network setup in DNS section is only one server 192.168.2.1

Any idea what is going on?


(Zimny) #6

The 192.168.2.1 dos is from remote by vpn tunel
Local where is vm don’t have this subnet
local network is 192.168.0.0 and NS address is 192.168.0.200
looks like when creating bridge for AD is going in mess


(Zimny) #7

how to explain this mess:

Last login: Sun Mar 25 10:17:29 2018 from imac.zimni.local

************ Welcome to NethServer ************

This is a NethServer installation.

Before editing configuration files, be aware
of the automatic events and templates system.

      http://docs.nethserver.org

[root@vps ~]# nslookup zimny.org
Server: 127.0.0.1
Address: 127.0.0.1#53

Name: zimny.org
Address: 51.255.167.153
Name: zimny.org
Address: 192.168.2.200

[root@vps ~]# nslookup zimny.org
Server: 127.0.0.1
Address: 127.0.0.1#53

Name: zimny.org
Address: 192.168.2.200
Name: zimny.org
Address: 51.255.167.153

[root@vps ~]#

This is output from my NS host
completely fresh install from yesterday

in network - > dos tab I have two entries for 192.168.2.1

can’t perform nslookup on vm at all
on NS host I have active directory at 192.168.0.254
bridge has been created when installing AD


(Zimny) #8

I think this is not good section for this bug
web virt is doing well
the issue is from vpn tunel i think


(Markus Neuberger) #9

Do you have the same domain name on two locations?

You are using the DNS servers of the remote location?


(Zimny) #10

Hi Markuz

Sorry for the late answer.
So please just ignore the thread.
My mistake.
DNS behaviour is ok because I’m using remote DNS through the VPN tunnel so two different ip for the domain are correct. One the public one and one the private from tunnel.
Got some problems when updating my vm on the beginning but that was suricata.
Everything is working well.

My mistake
Sorry to keep you busy and appreciate your time.

Regards,