Showing posts with label DNS. Show all posts
Showing posts with label DNS. Show all posts

Tuesday, November 14, 2023

pfSense - Not Resolving Hostnames to IP Addresses?

 


Intro:

For a while this has been bugging me. You should be able to ping a hostname on the local network and it should return the device's IP address. It's working for some hosts but not all. This is under Windows 10 Enterprise or Pro.

"ping orangepizero3" should return 192.168.2.226 but the ping command is stating "Ping request could not find host orangepizero3. Please check the name and try again.".




Fix:

Call up your pfSense web admin portal.

Navigate to "Services --> DNS Resolver".

Scroll all the way down and at the bottom enable the following two settings:
  • DHCP Registration
  • Static DHCP


The page will reload, click on "Apply" in green.



Flush the DNS resolver on your machine.

ipconfig /flushdns


Try pinging the host again.




Side Notes:

Google Chrome loves to not work properly on many levels. For the example above I'm finding that it doesn't even attempt to look up "orangepizero3" before returning "Address not found...".


If I call up "http://orangepizero3/admin" in a normal or private Chrome Window, I get the same error. 
  • CTRL + Reload doesn't do jack.
  • Clearing the DNS cache at "chrome://net-internals/?#dns" doesn't do shit either.

However if call it up in FireFox in either a normal page or private page, it loads the Pi-hole page after a second or two of thought. Subsequent lookups are even faster due to its caching.

At a loss with Chrome.



πŸ‘½

Monday, December 19, 2022

Windows - Reset TCP/IP Stack

 

Intro:

This is just a quick list of commands you can use to reset the TCP/IP stack in Windows.



Commands (CMD run as Admin):

ipconfig /flushdns

netsh winsock reset
netsh int ip reset
netsh interface ipv4 reset
netsh interface ipv6 reset
netsh interface tcp reset
netsh int reset all 

nbtstat -R
nbtstat -RR

netsh advfirewall reset



PowerShell (run as admin):

Get-NetAdapter | Restart-NetAdapter



Conclusion:

I'll add to this list as I either remember forgotten commands or I come across new ones.



πŸ‘½

Monday, April 18, 2022

Unifi Controller - STUN Not Working Through Cloudflare

 




Intro:

I had made some changes, removed the previous CDN and started using Cloudflare on a new site. Everything seemed ok at first. Setup the DNS records Cloudflare asks for on my serving host, Cloudflare verifies you own the domain, 24 hours later, and you're good to go......sorta.



Problem:

I have a slew of DDNS names running off of another domain for clients. About a week goes by and I realize I'm not able to resolve a client's DDNS name. I figure it's part of a local outage. Later that day I try again and the issue persists so I press on.



Fix:

First off I realized that the DDNS NS records didn't get pulled in to Cloudflare.

Ok so to solve that I literally had to import in each DDNS name, mark it as a NS record, and point it back to the name server where I have the DDNS service running. Within 15 minutes all of the NS records started working again.

A few days pass and I log into to take a look at my Unifi controller. Normally it's blabbering about latency errors from every single wireless client on every single site I have. The device don't actually have an issue but Ubiquiti doesn't seem to care when you try to inform them about the situation. Anyway that's a whole other conversation for another time.

I'm seeing STUN errors on every single device. I login into the router and double check port forwarding for the standard port of 3478. It's there all right. Turns out you can't hide an IP address through Cloudflare which has a STUN server running on it. Cloudflare only port forwards a select number of HTTP and HTTPS ports. The default for STUN, 3478, is not on the list. (While using a Unifi Cloud Key you cannot change this port. I can't even SSH into the damn thing to play around with the internals. I will do this in another post). So you have to select the gray cloud icon in Cloudflare and set that A record to not be proxied. Bummer.



Extras:

Here's a link to Unifi's default ports:

Here's a link to the article on Cloudflare denoting what port are forwarded:



πŸ‘½