Archive for the ‘Networking’ Category

Flushing the local DNS cache

If your messing around with DNS records and finding that names are are not resolving to their new locations (this happened to me today), flushing the local DNS resolver cache may help (if not, you probably have to wait for DNS propagation or you configured something incorrectly). I only needed to do this on a Windows server, but I decided to dig a bit deeper to find out how to do this on other systems as well.

On Windows:

ipconfig /flushdns

On Linux it’s a bit more difficult and not as simple as ifconfig /flushdns. You can try to restart the nscd daemon (note the path may be different depending on the distro):

/etc/rc.d/init.d/nscd restart

However, nscd may not be installed on some distros (e.g. Ubuntu) and applications (e.g. Firefox) may keep their own cache. So you’ll need to restart the application in such cases. If your desperate, you can also restart the entire networking subsystem:

/etc/rc.d/init.d/networking restart

On OS X, Leopard and higher

dscacheutil -flushcache

On OS X, Tiger and lower

lookupd -flushcache

Network security and filthy lies told by Windows XP

Note: Everything below relates to Windows XP Professional with Simple File Sharing turned off.

One of the simple things that can be done to prevent unwanted peer-to-peer network access to data on Windows is to disable the Guest account (you can alternatively give permissions to specific users or groups, but for my situation this is a hassle as I, generally, don’t need the level of granularity). By some mechanism unknown to me (perhaps malware or a recent virus), the guest account on my desktop was turned on. With the guest account on and shared folders allowing everyone access, any machine connected to the network was able to seamlessly login and access anything in the shared folders. The situation bugged me for quite a while as I didn’t realize the active guest account was the culprit because from looking at the User Accounts extension in Control Panel, I saw the following:

win xp guest account off

Unfortunately, this does not mean the account is actually disabled, it simply means it doesn’t appear on XP’s welcome screen. I finally took at look at the Administrative Tools >> Computer Management extension, then navigated to Local Users and Groups >> Users, and saw that the guest account was enabled. Disabling it here (right-click on Guest >> Properties >> check the “Account is disabled” checkbox), actually disabled the account and prevented automatic authentication as Guest for incoming peer-to-peer connections.

win xp users

As you can probably guess my real annoyance here is the discrepancy between what appears in the User Account extension vs. the actual state of the account.