Category Archives: Networking

Code Snippets Networking

Enable/disable firewall from command line

psexec \\pcname netssh firewall set opmode disable

Get PsTools:

more info:

Enable/disable firewall from command line

Networking Tutorials Utils

Nmap Cheat Sheet

Nmap has a multitude of options and when you first start playing with this excellent tool it can be a bit daunting. In this cheat sheet you will find a series of practical example commands for running Nmap and getting the most of this powerful tool.

Keep in mind that this cheat sheet merely touches the surface of the available options. The Nmap Documentation portal is your reference for digging deeper into the options available.

read more »

Code Snippets Networking NTP

Windows Domain and NTP Servers

Find your PDC Emulator

Get-ADDomainController -Discover -Service PrimaryDC

Transfer domain roles if needed

ntp Servers Pt


Using w32tm.exe

Run the following command on the PDC emulator:

w32tm /config /manualpeerlist:timeserver /syncfromflags:manual /reliable:yes /update

(where timeserver is a –space delimited– list of your time source servers)

Once done, restart W32Time service.

net stop w32time
net start w32time

Run the following command on all other DCs (that are not PDC):

w32tm /config /syncfromflags:domhier /update

Once done, restart W32Time service.

FIND DC’servers

PS   nltest /dclist:mydomain.local


Configurar o NTP no Linux

1- Vamos começar por instalar o ntp

yum install ntp

2- Agora activamos o serviço

chkconfig ntpd on

Indicação do servidor a usar para sincronizar o nosso relógio. Para esse vou usar um dos disponibilizados pelo Observatório Astronómico de Lisboa


Nota: O Observatório Astronómico de Lisboa disponibiliza 2 servidores para configuração dos relógios. Quem pretender usar os dois deve editar o ficheiro /etc/ntp.conf e incluir a seguinte informação:


3- Iniciar o serviço do ntpd

/etc/init.d/ntpd start 
Code Snippets Microsoft Networking Tutorials

How to find a Global Catalog server?

With DNS Requests (NSLOOKUP)

In an Active Directory environment, all Global Catalogs are anchored in DNS . There is a separate subdomain ‘GC._msdcs ….’ in the namespace of the AD root domain (please remember: the global catalog does not refer to individual domains, but to the entire forest). So if your root domain in the forest is e.g. example.root, then you get a list of all GCs with this command:

C:\> nslookup gc._msdcs.example.root

Server:  dns01.example.root

Name:  gc._msdcs.example.root

The container _msdcs contains the infrastructural DNS records of the Active Directory. This is also where all the SRVservice records for the domain controllers are stored.


You can also use the standard command line tool DSQUERY for searching GCs. The search can be limited to certain domains or AD sites. However, you must be authenticated in the regarding forest and DSQUERY must be available on your machine (this is usually the case on Widows servers). As a result, the server objects in the Configuration partition is displayed:

C:\> dsquery server -isgc


C:\> dsquery server -isgc -domain ""

C:\> dsquery server -isgc -site "Site-Auckland"

Per Script with an LDAP filter
In the last section we have seen that the global catalog servers are present in the configuration partition of the directory as specific objects. Her we can look for them with our own script. These servers have set the first bit in their ‘options’ attribute. All we need is the appropriate LDAP filter:

ldapFilter = "(&(objectClass=nTDSDSA)(options:1.2.840.113556.1.4.803:=1))"

Set rootDSE = GetObject("LDAP://rootDSE")
configDN =   rootDSE.Get("configurationNamingContext")

Set ado = CreateObject("ADODB.Connection")
ado.Provider = "ADSDSOObject"
ado.Open "ADSearch"
Set objectList =   ado.Execute("<LDAP://" &configDN& ">;" & ldapFilter & ";distinguishedName;subtree")

While Not objectList.EOF
nTSDSA = objectList.Fields("distinguishedName")
serverDN = Mid(nTSDSA, 18)                                         'CN=NTDS Settings abschneiden => Server Objekt
Set serverObj = GetObject("LDAP://" & serverDN )

WScript.Echo serverObj.dNSHostName




Microsoft Networking

How Do I Find A List Of Global Catalog Servers Using Nslookup?

The following commands will list all Global Catalog Servers in your Active Directory domain:

  1. From the command prompt, type nslookup.
    • C:\nslookup
  2. Set the type to server.
    • >set type=srv
  3. Find the Global Catalog Server(s).
    • >_gc._tcp.<DnsForestName>
  4. Example:
    •  >_gc._tcp.“your”
  5. The results will include the hostname and IP address of each Global Catalog Server.
  6. Type “exit” to leave the nslookup session.


Backup Networking

World Backup Day – March 31st

Don’t be an April Fool.
Backup your files.
Check your restores.

Remember to ensure your files are backed up on March 31st.

Backup your memories and financial information and check your old backup restores.

Hyper-V Microsoft Networking Virtualization

Microsoft Lync

Windows 8 is going to be including a client hypervisor running a version of Hyper-V

  • Hyper-V on Windows 8 client will require 64 bit and SLAT
  • It will support small to large VMs.  The VM size noted included 32 processors and 512 GB of RAM!
  • Console views for virtual machines can support up to 1600 x 1200 (nice, as I have that resolution on my PC)
  • Support for VHD and VHDX
  • “Live Storage Move” capabilities
  • Virtual Machines with using wireless NICs on hosts
  • Physical machine “sleep” still works (major change from previous releases)

source links:

Internet Networking

Testes a velocidade da sua ligação

Ookla Net Metrics:
My Speed:
Bandwidth Place:
PC Pitstop:
Speed Test Tool:
McAfee Speedometer:
Internet Speed Test:
SG Broadband:
A Beltronica:
Speedmeter FCCN:

.NET IIS Microsoft Networking

IIS does not allow downloading files from .mdb format.

add the following to the web.config as follows:

<?xml version="1.0" encoding="UTF-8"?>
        <fileExtensions allowUnlisted="true" >
          <remove fileExtension=".mdb" />
          <add fileExtension=".mdb" allowed="true"/>

MIME Type must be registered on IIS

Microsoft Networking

Installing GPMC on Windows Server 2008 and Windows Vista Service Pack 1

The Group Policy Management Console is included in Windows Server 2008; however, you must install it before you can use it. The domain controller promotion process installs GPMC on the server, in addition to adding the domain controller to the domain. Additionally, you can install GPMC on a member server as long as it’s a member of the domain. Let’s look at two ways to install GPMC on Windows Server 2008 (other than through DCPROMO).

Installing GPMC using Server Manager (Windows Server 2008)

The Group Policy Management Console is a Feature in Windows Server 2008. You install Features using Server Manager. Once installed, you can access the feature using Server Manager or you can the specific management console (like gpmc.msc).

read more »