Windows server 2008 Core – How to set static IP address via command line

Posted by Mark | Posted in Command line, Networking, Windows 2008 | Posted on 30-07-2009

0

This topic will show how to set static IP 192.168.0.10 with mask 255.255.255.0 to your Windows server 2008 Core interface named “Local Area Connection” .

Also we will set DNS server IP 192.168.0.11.

To set static IP address and mask type:

netsh interface ipv4 set address name=”Local Area Connection” source=static address=192.168.0.10 mask 255.255.255.0

To set DNS server IP type:

netsh interface ipv4 add dnsserver name=”Local Area Connection” address=192.168.0.11

Windows server 2003 and Windows XP – How to reset winsock catalog

Posted by aidas | Posted in Command line, Networking, Windows 2003, Windows XP | Posted on 19-05-2009

0

This post will show you how to clear up Winsock Catalog on your Windows server 2003 or Windows XP machine. To do it open command line and type:

netsh winsock reset

Restart your computer after this.

Note that you might need to run IP reset afterwards to completely rebuild your IP stack.

? Winsock catalog – is the interface between your applications and internet. Many spyware reside there when they infect your OS.

Windows server 2003 and Windows XP – How to reset IP stack

Posted by aidas | Posted in Command line, Networking, Windows 2003, Windows XP | Posted on 18-05-2009

0

This post will show you the way how to reset IP stack on your Windows server 2003 or Windows XP machine. Lets say we want to reset IP stack and write log to C:\resetlog.txt file. Note that log file is not optional parameter. To perform reset open command line and type:

netsh int ip reset C:\resetlog.txt

Windows XP – How to run Network Diagnostics scan

Posted by aidas | Posted in Networking, Tools, Windows XP | Posted on 18-05-2009

0

This post will show you how to run Network Diagnostics scan to test your network connectivity and troubleshoot related issues. I personally run this tool first thing every time i troubleshoot network related issues on client system. To run scan open command line on your Windows XP and type:

netsh diag gui

In “Network Diagnostics” windows select “Set scanning options” to set or unset various scanning objects that will be tested during scan.

To start scan press “Scan your system” button.

Windows server 2003 – How to build IPsec policy rule via command line

Posted by aidas | Posted in Command line, Networking, Windows 2003 | Posted on 15-05-2009

0

This post will show you how to build IPsec policy rule using command line on your Windows server 2003.

Lets say we want to block TCP 80 port to make internal web sites inaccessible. First of all we need to create IPsec policy. To do it open command line and type:

netsh ipsec static add policy name=”Block TCP port 80″ description=”Block any internal web sites”

Next step is to create filter for newly created policy. To create it type:

netsh ipsec static add filter filterlist=”80 TCP” srcaddr=any srcport=0 dstaddr=me dstport=80 protocol=tcp mirrored=yes

srcaddr – source address
srcport – source port
dstaddr – destination address
dstport – destination port

Next lets create filter action to block traffic. To do it type:

netsh ipsec static add filteraction name=block action=block

Now we have all needed components to build IPsec policy rule. Policy, filter and filter action. To build policy rule type:

netsh ipsec static add rule name=”Block TCP 80″ policy=”Block TCP port 80″ filterlist=”80 TCP” filteraction=”block”

And the last step is to activate newly created rule. To do it type:

netsh ipsec static set policy name=”Block TCP port 80″ assign=y

Windows server 2003 and Windows XP – How to change the binding order of network adapters

Posted by aidas | Posted in Networking, Windows 2003, Windows XP | Posted on 14-05-2009

0

This post will show you how to change binding order of network adapters in your Windows server. Usually you have several network adapters that are connected to different networks. Also you may have a program that uses only first connection in the network connections list and you may want to make sure that this network connection is at the top of the list. Lets check how can we change priority in this list.

To change binding order of network adapters click Start>Run, type ncpa.cpl and press OK.

In “Network Connections” window select Advanced menu and click “Advanced Settings”.

In “Adapters and Bindings” tab under “Connections” area  you`ll see all your network connections. To change priority order select desired network connection and use arrows in the right to move up or down in priority list.

Windows server 2003 and Windows XP – How to disable NetBIOS over TCP/IP

Posted by aidas | Posted in Networking, Windows 2008, Windows XP | Posted on 13-05-2009

0

This post will show you how to disable NetBIOS over TCP/IP on your Windows server 2003. NetBIOS over TCP/IP is a must for legacy windows os (pre windows 2000) and applications based on NetBIOS resolving. If you dont have any of these you can get rid of NetBIOS in a few clicks.

To disable NETBIOS over TCP/IP click Start>Settings>Network Connections. Right click desired network adapter and select properties.  Select “Internet protocol (TCP/IP)” in “General” tab and press “Properties”. Now press “Advanced” in “General” tab. Select “WINS” tab in “Advanced TCP/IP Settings” window. Under “NetBIOS setting” select “Disable NetBIOS over TCP/IP” and press OK two times.

Windows server 2003 – How to clear arp cache via command line

Posted by aidas | Posted in Command line, Networking, Windows 2003 | Posted on 08-05-2009

1

This post will show you how to clear arp cache on your Windows server 2003 using command line. To do it open command line and type:

netsh interface ip delete arpcache

Windows server 2008 – How to view network configuration remotely

Posted by aidas | Posted in Command line, Networking, Windows 2008 | Posted on 07-05-2009

0

This post will show you how to view network configuration on remote server using command line. Lets say we want to check network configuration on remote server named “Testserver1″. To do it open command line on your Windows server 2008 and type:

netsh -r Testserver1 interface ip show config

If you need to supply different credentials to run this command type:

netsh -r Testserver1  -u testdomain.com\Admin -p Pa$$w0rd interface ip show config

Windows server 2003 – How to check remote port availability

Posted by aidas | Posted in Command line, Networking, Tools, Windows 2003 | Posted on 07-05-2009

0

This post will show you how to check if remote port is listening for incoming connections. Lets say we want to query server named “testserver” to check if TCP port 3389 (Remote desktop connection) is listening. Open command line and type:

portqry /n testserver /p TCP /e 3389

Note that portqry is part of Windows server 2003 support tools. They can be found on your OS CD (Support\Tools directory) .

Windows server 2003 – How to capture network traffic

Posted by aidas | Posted in Command line, Networking, Windows 2003 | Posted on 07-05-2009

0

If you want to capture network traffic on your Windows server 2003 this how to will show you the way to go. For this case we can use nice utility from Windows support tools netcap. When first run this tool will install Network Monitoring Driver on your server. Ok, lets say we want to monitor traffic for 15min and save all output to D:\monitoring directory. Open command line and type:

netcap /f:D:\monitoring /l:00:15:00

If you want to get rid of Network Monitoring Driver after you`ll finish traffic capture open command line and type:

netcap /remove

Note that netcap is part of Windows server 2003 support tools. They can be found on your OS CD (Support\Tools directory) .

Windows server 2003/2008 – How to check network connectivity

Posted by aidas | Posted in Command line, Networking, Windows 2003, Windows 2008 | Posted on 07-05-2009

0

If you have network connectivity problems on your Windows server 2003 this how to is for you. Lets say we have problem with connecting to network resource and want to troubleshoot this. Open command line on your server and type:

netdiag

These tests are performed by running netdiag:

# Netcard queries test
# IpConfig test
# Autoconfiguration test (APIPA)
# NetBT name test
# WINS Service test
# Default gateway test
# NetBT name test
# WINS Service test
# Domain membership test
# NetBT transports test
# Autonet address test (APIPA)
# IP loopback ping test
# Default gateway test
# NetBT name test
# Winsock test
# DNS test
# Trust relationship test
# Kerberos test
# LDAP test
# Bindings test
# WAN configuration test
# Modem configuration test
# IP Security test
# Redir and Browser test
# DC discovery test
# DC list test
# Trust relationship test
# Kerberos test
# LDAP test
# Bindings test
# WAN configuration test
# Modem configuration test
# IP Security test

Note that netdiag is part of Windows server 2003 support tools. They can be found on your OS CD (Support\Tools) .