Category Archives: Networking

Active Directory Networking

Using Ntdsutil Tool to Manage Active Directory

The NTDSutil.exe utility is one of the key tools to manage Active Directory and its database (ntds.dit file).

The NTDSutil utility can be used by AD administrators in various scenarios. Most often the utility is used to:

  • Transfer (seizing) FSMO roles in the AD domain between domain controllers;
  • Authoritative restoring of deleted objects in Active Directory;
  • Remove faulty (missing) AD domain controllers;
  • Performing AD database maintenance: checking integrity, compressing, moving the ntds.dit file or AD log files to another drive on a domain controller in order to increase performance;
  • Active Directory snapshot management;
  • Change the administrator password for the DSRM (Directory Services Restore Mode) recovery mode.

To display the basic syntax of the NTDSutil utility, open an elevated command prompt on the domain controller and run:

Ntdsutil.exe /?

As you can see, the Ntdsutil utility has a few subcommands available. Let’s try to learn them in more detail with examples.

Let me remind you that in the AD there are five FSMO (Flexible Single Master Operation) roles:

  1. Schema master;
  2. Domain naming master;
  3. RID master;
  4. PDC emulator master;
  5. Infrastructure master.

These roles can be assigned to different domain controllers in the AD forest and/or domain. The current owners of FSMO roles can be obtained using the command:

netdom query fsmo

source link: https://theitbros.com/ntdsutil/

Code Snippets Networking

Enable/disable firewall from command line

psexec \\pcname netssh firewall set opmode disable

Get PsTools:
https://docs.microsoft.com/en-us/sysinternals/downloads/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

https://technet.microsoft.com/pt-pt/library/cc816944(v=ws.10).aspx

ntp Servers Pt

http://www.pool.ntp.org/zone/pt
pool.ntp.org

Set NTP

https://blogs.technet.microsoft.com/nepapfe/2013/03/01/its-simple-time-configuration-in-active-directory/

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

NTP – Sincronize o relógio do seu 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

ntpdate ntp02.oal.ul.pt

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:

server ntp02.oal.ul.pt
server ntp04.oal.ul.pt

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
Address:  10.127.60.3

Name:  gc._msdcs.example.root
Adresses:  10.127.60.100
10.127.60.102
10.127.60.103
10.127.77.1
10.127.77.130
10.127.93.2
10.127.93.12
192.168.35.1

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.

With DSQUERY

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

“CN=DC001,CN=Servers,CN=Site-Sidney,CN=Sites,CN=Configuration,DC=example,DC=root”
“CN=DC014,CN=Servers,CN=Site-Auckland,CN=Sites,CN=Configuration,DC=example,DC=root”

C:\> dsquery server -isgc -domain "dev.example.com"

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

objectList.MoveNext
Wend

 

 

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 domain.com”
  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.

http://www.worldbackupday.com/

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:

  • http://media.ch9.ms/ch9/cddc/8b132177-428a-4b5d-8267-9f560134cddc/HyperV09062011_low_ch9.mp4
  • http://blogs.msdn.com/b/b8/archive/2011/09/07/bringing-hyper-v-to-windows-8.aspx
  • http://lync.microsoft.com/pt-br/Paginas/default.aspx
  • http://www.microsoft.com/download/en/details.aspx?id=21129
  • http://office.microsoft.com/en-us/communicator-help/video-what-is-lync-2010-VA102056728.aspx
Internet Networking

Testes a velocidade da sua ligação

Speedtest: http://www.speedtest.net/
seepd.io: http://www.speed.io/index_en.html
Speakeasy: http://www.speakeasy.net/speedtest/
Ookla Net Metrics: http://www.ookla.com/
My Speed: http://myspeed.visualware.com/
Bandwidth Place: http://www.bandwidthplace.com/
PC Pitstop: http://www.pcpitstop.com/internet/bw.asp
Speed Test Tool: http://www.internetfrog.com/mypc/speedtest/
my-speedtest: http://www.my-speedtest.com/pt/
McAfee Speedometer: http://us.mcafee.com/root/speedometer/default.asp
Internet Speed Test: http://www.whatismyip.com/speedtest/index.asp
PC911: http://www.pcnineoneone.com/speedtest.html
T1: http://www.t1shopper.com/tools/speedtest/
SG Broadband: http://www.speedguide.net/speedtest/
Speedtest2: http://www.speedtest2.com/
A Beltronica: http://www.abeltronica.com/velocimetro/pt/?idioma=uk
PT: http://qos.sapo.pt/
Speedmeter FCCN: http://speedmeter.fccn.pt/
testesuavelocidade: http://www.testesuavelocidade.com.br/
testeseuping: http://www.testeseuping.com.br/
Copel: http://speedtest.copel.net/speedtest.swf
RJnet: http://www.rjnet.com.br/1velocimetro.php
Velocimetro: http://www.velocimetro.com.pt/index.html

.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"?>
<configuration>
  <system.webServer>
    <security>
      <requestFiltering>
        <fileExtensions allowUnlisted="true" >
          <remove fileExtension=".mdb" />
          <add fileExtension=".mdb" allowed="true"/>
        </fileExtensions>
      </requestFiltering>
    </security>
  </system.webServer>
</configuration>

MIME Type must be registered on IIS