Internet on windows but not ubuntu bad pfsense configuration?
-
Hi everyone,
First of all sorry for my english, it's not my native language. I tried a few forums in my native language, but nobody could help me.
A couple of days ago I posted a topic with what I thought dhcp problems but it wasn't.
I made a complete new install of my ubuntu machine.
The problem I have is I can access internet with my windows virtualized machine, but not with my Ubuntu virtualized machine on my DMZ. Here is my network diagram :
My lan is my domain and dns server of my domain is 192.168.0.10 which is also my active directory.
My DMZ should be only a web server. The windows server 2016 and windows professional 10 are in my dmz only for testing. The only machine who should be working in my DMZ is my Ubuntu web server.
I noticed, when I restart the pfSense machine that I can get internet on Ubuntu and when I restart the ubuntu VM i lose the connection.
I don't know where to search i am practically sure it's something to do with the dns forwarder but can't fix it.Does anyone have an idea where to search or how i could fix it ?
Thank you very much :)
Farisse
-
For the DMZ are you using pfSense DNS Resolver in forwarding mode or DNS forwarder?
Can you post screenshots of the DNS settings and if using forwarding also the DNS server settings in System / General Setup? -
Hi thank you for your answer,
I actually enabled the DNS forwarder thinking it would forward the dns server that ar in my System / General Setup. But apparently not.
Here are the screenshots :
-
I'm not familiar with the DNS forwarder (dnsmasq) but that seems like it should work. What you can try is DNS Resolver in forwarding mode. See if you get any difference.
-
Yup, it should i don't understand either why its not working.
How should i do to put the DNS resolver in forwarding mode ?
-
Before doing that maybe try some more troubleshooting.
Try to run a dig from Ubuntu and maybe also from pfSense to compare the results.
e.g.,
dig google.com
dig @8.8.8.8 google.comThe first should use your default DNS server the second is using google's DNS server.
-
Check pfSense itself can resolve. Test something in Diag > DNS Lookup. Be sure all configured servers respond, that should include 127.0.0.1.
Make sure both VMs appear in the pfSense DHCP lease table. You might have something else handing out leases.
Steve
-
-
Woaw 8 seconds for a query could be your issue. Those DNS servers are used only for this DMZ?
-
Nope those are DNS servers on my school's network. :/ Can not work without them
-
@Farisse said in Internet on windows but not ubuntu bad pfsense configuration?:
Nope those are DNS servers on my school's network. :/ Can not work without them
...Can not work with them either.
Edit
Something is very wrong there. Even if your were to ping a server at the furthest possible point on the planet, I would not expect a number like that. -
Haha got me ! But actually it work but only on windows VMs and not on Ubuntu. Idk if ubuntu is using different dns ports (not at my knowledge) Or if pfSense is sending the dns request to the wrong servers ?
-
@Farisse said in Internet on windows but not ubuntu bad pfsense configuration?:
Haha got me ! But actually it work but only on windows VMs and not on Ubuntu. Idk if ubuntu is using different dns ports (not at my knowledge) Or if pfSense is sending the dns request to the wrong servers ?
Could it be that Ubuntu's query timeout is shorter than Windows?
-
I think using pfSense DNS resolver could help here since it would build up a cache.
-
Idk, but when i restart the services i can get internet on my ubuntu.
So maybe my ubuntu is making a link with the dns servers when nothing can intercept the packets.
And if pfsense if running again it can't 'wipe' packets when the connection is established so ubuntu vm still have internet.
But when i restart the ubuntu vm every connection is closed and could not be established again.This is what i guess but i don't know how to fix it by a port forwarding or traceroute can't determine where it sucks :/
-
@Farisse said in Internet on windows but not ubuntu bad pfsense configuration?:
Should the pfSense DHCP lease table show me the static ip from my vms ?
Also, going back to @stephenw10 question on DHCP leases. That needs to be cleared up.
-
@Raffi_ said in Internet on windows but not ubuntu bad pfsense configuration?:
That needs to be cleared up
I activated dns resolver with forwarding but still doesn't work.
I try it with Chrome and i receive this error:
-
Yeah that is catastrophically bad! Something is very broken there.
I guess the DNS timeout in Windows is higher which is why it worked.
You don't see localhost there so you probably have 'Do not use the DNS Forwarder/DNS Resolver as a DNS server for the firewall' set in System > General setup. That doesn't make much difference unless you have host overrides there the firewall should use.
Steve
-
@Raffi_ said in Internet on windows but not ubuntu bad pfsense configuration?:
Woaw 8 seconds for a query could be your issue. Those DNS servers are used only for this DMZ?
I thought I would note this too, but I rather skipped it, hihihihhi
-
I activated dns resolver with forwarding but still doesn't work.
I try it with Chrome and i receive this error:
Try it a second time. Once unbound caches it, it should come right up the second time.
-
@stephenw10 said in Internet on windows but not ubuntu bad pfsense configuration?:
You don't see localhost there so you probably have 'Do not use the DNS Forwarder/DNS Resolver as a DNS server for the firewall' set in System > General setup. That doesn't make much difference unless you have host overrides there the firewall should use.
Steve
Would dnsmaq use the local host as well or is that only the default for unbound?
-
@stephenw10 Its not after you told me i should probably have the localhost as respond i remembered i had in the beginning in general information the localhost and then not anymore. So i've add it back with the dns server (good or wrong way idk) But ly query is a lot faster now.
But the option "Do not use the DNS Forwarder/DNS Resolver as a DNS server for the firewall " is not set in.
@Raffi_ I also tried it a second and third time, but no result. Or ... the same result.
-
If you are using DNS resolver with forwarding mode, the first option will be the local host by default. There is no need to enter it again under DNS Server Settings in the General setup tab.
Edit, something doesn't seem right with those 1ms query times. How would it go from 8 seconds to 1ms? I think this might be the DNS lookup GUI bug I've seen in the past.
Run those dig commands from pfSense instead.
Diagnostics/ Command Prompt
dig @172.20.0.253 google.com
dig @172.20.0.254 google.comI think those might give you the real results.
-
just an idea
it would be worthwhile to look at and compare these:Windows: https://docs.microsoft.com/en-us/previous-versions//cc977482(v=technet.10)?redirectedfrom=MSDN
Linux: /etc/resolv.conf
search domain.net
option timeout:1
nameserver 1.1.1.1
nameserver 2.2.2.2
nameserver 3.3.3.3or something like that
-
-
Interesting, well the two DNS servers seem to be responding better now. That could also be because they are caching.
How is Ubuntu getting its interface settings? Is it statically assigned in Ubuntu or is it set to automatic (DHCP)? There were no leases in your DHCP list.
-
I assigned static ip through /etc/netplan/01-network-manager-all.yaml
Everything seems good to me....
Edit, maybe an non relevant information, i can not ping the other vms in the dmz network. But my other vms can ping my ubuntu vm. Could it be something to do with routing ?
-
Try running a packet capture on the DMZ of pfSense.
Diagnostics/ Packet Capture
Select DMZ, then in Count enter a very high value such as 10000. You can enter 0 but don't forget to stop the capture manually otherwise it will run a continuous capture and it can become a problem.Download the capture data to wireshark and check for DNS info.
Dumb question, but have you tried to ping 8.8.8.8 from ubuntu? Does that work or is that failing as well?
-
@Raffi_ said in Internet on windows but not ubuntu bad pfsense configuration?:
Dumb question, but have you tried to ping 8.8.8.8 from ubuntu? Does that work or is that failing as well?
Nope doesn't work because its blocked by the school.
I'll try the packet in a few minutes
-
@Farisse said in Internet on windows but not ubuntu bad pfsense configuration?:
@Raffi_ said in Internet on windows but not ubuntu bad pfsense configuration?:
Dumb question, but have you tried to ping 8.8.8.8 from ubuntu? Does that work or is that failing as well?
Nope doesn't work because its blocked by the school.
I'll try the packet in a few minutes
ICMP is blocked or google DNS server specifically is blocked?
-
ICMP I guess. I can ping outside the network but not 8.8.8.8 or 8.8.4.4 I wont recieve any result wit this commands i began the ping on ubuntu and then on the windows machine who got internet:
-
@Raffi_ said in Internet on windows but not ubuntu bad pfsense configuration?:
Select DMZ, then in Count enter a very high value such as 10000. You can enter 0 but don't forget to stop the capture manually otherwise it will run a continuous capture and it can become a problem.
Download the capture data to wireshark and check for DNS info.So apparently my ubuntu machine does not send any dns request :
-
@Farisse said in Internet on windows but not ubuntu bad pfsense configuration?:
So apparently my ubuntu machine does not send any dns request :
That's not good. Is it even able to talk to pfSense at all? Can you ping pfSense (192.168.1.1) from Ubuntu?
-
Yup but not able to ping windows machine
-
@Farisse said in Internet on windows but not ubuntu bad pfsense configuration?:
Yup but not able to ping windows machine
It can't ping Windows because by default Windows does not respond to ping. That has to be manually enabled in Windows. It is responding to pfSense though. So at least there is some sign of life there.
-
Damn forgot to disable fw on this windows machine. >.<"
So apparently I don't know why, I suddenly have internet on my ubuntu machine.
I did not change anything i've reset my ubuntu vm twice to be sure and it seems to work. What the hell is going on here :o i think i'm losing my mind
-
@Farisse said in Internet on windows but not ubuntu bad pfsense configuration?:
Damn forgot to disable fw on this windows machine. >.<"
So apparently I don't know why, I suddenly have internet on my ubuntu machine.
I did not change anything i've reset my ubuntu vm twice to be sure and it seems to work. What the hell is going on here :o i think i'm losing my mind
lol don't touch it. You have a number of things which don't make sense. Like for instance the ping to pfSense is taking on average 600ms. In reality it should be more like 6ms. You have two extra zeros of delay. That's not good.
-
Haha i won't but hope it will work when i will need it ! :D
Apparently even this is fixed. :192.168.1.1 is my gateway to pfsense and 192.168.0.50 is pfsense ip..
I really hope it will stay working as i need it crossfingers
Many thanks for your help guys!
-
@Farisse said in Internet on windows but not ubuntu bad pfsense configuration?:
Damn forgot to disable fw on this windows machine. >.<"
you donโt have to disable it all, just use this
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
-
Oow Nice good to know !! I actually disabled the fw just for testing, after the test i would reanable the firewalls but very good to know for my other servers maybe !! Thank you !