Month: November 2018

Find the DNS being used on linux

This is useful when troubleshooting some network related issues and you need to find which DNS servers are being used. Since resolv.conf is not really used much anymore, it’s most likely that your DNS settings are set in the NIC configuration file, which is located at /etc/network/interfaces. 

You can also print which DNS is being used on a per interface basis by doing the below – 

Identify the NIC you want to use by using 

ifconfig

Once the names of the NIC’s have been printed, find the one you want and issue this command 

nmcli device show <INTERFACE NAME> | grep IP4.DNS

Obviously replace the “<INTERFACE NAME>” with you know what.

Remove “Network” from Windows Server Explorer sidebar

This is a registry edit that will remove the “network” icon from the file explorer window on Server 2012 R2 and most likely even Windows 7/8/10.

This is done by creating a registry key via GPO under User Configuration.

User Configuration, Preferences, Registry

Right click and choose New, Registry Item


Hive: HKEY_LOCAL_MACHINE
Key Path: SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\NonEnum
Value name: {F02C1A0D-BE21-4350-88B0-7367FC96EF3C}
Value type: REG_DWORD
Value Data (hex): 00000001

Windows Server 2012 RDP Logon Timeout

When using the interactive logon via RDP, you will find that you will be disconnected  if you do not login after the initial 30 seconds of the connection being established. This will cause the RDP window to close.

In my case, since this was a kiosk image being deployed across offices with only RDP running, it would look un-pleasent with the RDP session constantly restarting every 30 seconds. The below registry addition fixes/extends the timeout period.


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp

Create a DWORD key “LogonTimeout” in the above location and input the amount of time you want the initial logon screen to be displayed in seconds. I used 1800 seconds which is 30 minutes. Make sure to use decimal when inputting this value.

Once this is applied, reboot your machine and test!