Questions tagged [netsh]

In software, netsh, or network shell, is a utility included in Microsoft's Windows NT line of operating systems beginning with Windows 2000. It allows local or remote configuration of network devices.

Filter by
Sorted by
Tagged with
0
votes
2answers
72 views

Port proxying with netsh

I am working on windows machine and using netsh portproxy to forward traffic from port 4000 to application running on port 4002. It works fine when trying to access my application from localhost or ...
0
votes
1answer
26 views

Windows 10 remote tools not working, mmc, psexec etc

I'm having a problems on the network Some newer Windows 10 PC's (Win10 image from Dell), behave different, then older Dell PC's. They have the same service pack's and hotfixes, its something in ...
1
vote
0answers
496 views

Accessing WSL2 From Public IP Address

I have installed WSL2 with Ubuntu 20.04 on Windows 10. I have an Apache server running in WSL2, and this works fine when I use a browser in Windows (Chrome) to access it via WSL IP address. As the ...
1
vote
0answers
33 views

Using 'netsh interface ip set address' to override another adapter's address?

I'm one of the developers of the OpenConnect VPN client. We're trying to modernize and improve our support for Windows. We use a user-customizable JScript called vpnc-script-win.js to configure IPv4/...
0
votes
1answer
45 views

Simulate network reset or failure in Windows

I have to check if my server application can recover from transient network failures. The application listens on some ports and is a client to backend services. I would like to run some command or ...
0
votes
1answer
95 views

Get-NetIPInterface property 'Dhcp' is 'Enabled' after setting static IP configuration with netsh

The Question Set a static IP configuration with netsh: netsh interface ipv4 set address name="Ethernet1" static 192.168.0.20 255.255.255.0 192.168.0.1 netsh interface ipv4 set dns name="...
1
vote
0answers
86 views

How to delete IPv6 DNS Servers via command line?

I can successfully delete IPv4 DNS Servers via command line on a Windows Server 2019 with the following command: netsh interface ipv4 delete dnsserver "My Ethernet" all After this command I ...
0
votes
0answers
133 views

Using netsh portproxy to forward from computer to VPN

I have a VPN client set up on my Windows machine connecting to a VPN elsewhere. I have a small embedded Linux device on the same local network as my Windows machine. This device needs needs to ...
0
votes
0answers
43 views

Using netsh to portforward to a VPN

I have a VPN client set up on my Windows machine connecting to a VPN elsewhere. I have a small embedded Linux device on the same local network as my Windows machine which needs to communicate through ...
10
votes
1answer
1k views

How do I dump raw data from a TCP port in Windows using the netsh command?

I have an apparently simple issue which is proving very difficult to find an answer for. The site has a highly-secured Windows Server 2019 installation and an appliance connected to it running on a ...
0
votes
0answers
16 views

windows netsh backup -data format wont restore

The network interface configuration backup files using netsh (netsh interface dump > file.dat) include a first word that is the BOM (Byte Order Marker) "FFFE" for UTF16LE apparently. (&...
0
votes
0answers
100 views

Netsh command not found on Azure server

I have a Microsoft Azure server and I need the netsh command, but netsh.exe is not where I would expect it. I've tried creaing an Administrator powershell session, and an administrator CMD session. I ...
1
vote
0answers
321 views

Proper way to configure Windows 10 firewall for multiple users

We are deploying a Windows 10 LTSC image to multiple devices. The image configures one admin user and a second non-admin user. The non-admin user is the primary account for day-to-day use of the ...
-1
votes
2answers
191 views

windows 10 firewall: block any ip address but one

i have just enabled remote desktop on a windows 10 computer, and in fact when i telnet to 3389 port from any other computer i can reach that service, but what i want is to deny the connection from any ...
0
votes
2answers
2k views

Use netsh to show enabled firewall rules only

I'm using the following command to list firewall rules netsh advfirewall firewall show rule dir=in name=all How can I display enabled rules only? There's no switch like enabled=true
0
votes
1answer
175 views

Using netsh or netstat (or other native tool) to display UDP traffic to Windows server from given host

We have a Windows server that we suspect is not receiving UDP traffic from a Linux server. We've been able to establish, using tcpdump, that the Linux server is sending UDP traffic and we would like ...
2
votes
1answer
2k views

How to disable IPv6 dhcpstaticipcoexistence on Server 2019

I have a Server 2019 host that has a static IPv6 address. It seems Microsoft added a feature in Windows 10 that is also present in 2019 where a host can have both a static IP address, as well as a ...
1
vote
0answers
198 views

Outbound NAT on Windows

I am starting to admin Windows server and have some troubles with network tools. I am trying to configure nat on Windows Server 2012. My Windows VM has two networks adapters, the first one connected ...
1
vote
0answers
630 views

When is “netsh.exe http update sslcert” available?

On some PC's running netsh.exe http update help shows the command netsh.exe http update sslcert and it works, but on other PC's it does not. (Both running Windows 10.) When was it introduced / removed?...
1
vote
1answer
881 views

How to enable folder sharing using netsh?

I'm trying to enable folder sharing for all. netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes Seems to work for File and Printer but netsh advfirewall firewall ...
1
vote
1answer
125 views

How to change network adapter DNS servers on Windows without using netsh or WIM

I would like to modify network adapter DNS servers on Windows programmatically. I don't want to use WMI, because it fails for instance when no network cable is connected to the ethernet adapter being ...
0
votes
2answers
741 views

SMB on a NIC with multiple IP in same subnet

I have a Windows 2008 R2 server and set multiple IPs(same subnet) on a NIC. Now SMB service is binding on the lowest IP address as port 139, 455 are opened on it. My question is, can I bind SMB to ...
1
vote
2answers
3k views

NETSH - how to bind SSL Certificate to port and pass traffic to application?

On Windows Server 2016 I have a simple python web server (in flask). It works great, and listens on port 80 (or whatever I configure it to listen on). I need to serve it over SSL. I have a good ...
1
vote
0answers
704 views

Dhcp server on windows 2008r2 gives this error: “unable to determine the dhcp server version”

Hi i have two dhcp server on my lan and each of them is running on a dc (windows 2008r2). i'd like to manage both of the dhcp server from the command line with the netsh command by domain\...
1
vote
0answers
257 views

How to clear program/service from Windows firewall rule with netsh

I want to use netsh.exe to modify an existing Windows firewall rule, to remove the "Programs" and "Services" part of the rule. In other words, I want to set it to "All programs that meet the specified ...
1
vote
0answers
103 views

Wireless Hosted Network client isolation

I would like to know if there is an option to enable/disable client isolation when using the Wireless Hosted Network feature, present in most windows 7 laptops with a capable wireless adapter, and ...
0
votes
0answers
140 views

No Effect Registering SSL Certificate for HTTP port on a Windows Server

I have this Windows Server 2016 where a windows third-party Windows service is listening to a specific port that is in turn associated with a specific SSL certificate. At first, the SSL certificate ...
0
votes
1answer
2k views

Set Remote Computer To DHCP Enabled Without Using WinRM

How can I set a remote computer to use DHCP instead of a static IP address? I have tried using Set-NetIPInterface -DHCP Enabled however this requires WinRM which is disabled on my network. How can I ...
1
vote
0answers
410 views

IIS stops listening

I have a Windows server that periodically stops responding to requests on a particular IP address. I can find no reason/cause, but I'll confess right off the bat that I'm not a sys/network admin. The ...
1
vote
0answers
60 views

netsh dhcp differs from mmc dhcp

While building an automated script for counting the amount of Wi-Fi users I encountered the following problem on our W2k8r2-server: Netsh dhcp server scope 192.168.1.0 show clients No of clients: 13 ...
1
vote
1answer
10k views

blocking ip address with netsh filter

i am trying to block ip address on my machine by doing the following in cmd netsh ipsec add policy name=IPSystem netsh ipsec static add filter filterlist=BlackList srcaddr=74.356.69.108 dstaddr=me&...
1
vote
0answers
304 views

Disabling ECN: Netsh: incorrect paramater when executing via SaltStack cmd.run

I'm attempting to mass disable Explicit Network Congestion Notification on a group of Windows Server 2012r2 servers hosted in AWS EC2. I'm using the Salt Stack configuration management tool. When I ...
3
votes
1answer
2k views

netsh dhcp binding command not working on Server 2016?

I have kind of a weird issue. I'm migrating Server 2008 R2 to Server 2016. We have a DHCP Server role which services two scopes. When setting them up, a line runs: netsh dhcp server \\computername ...
1
vote
1answer
1k views

Two Option ID 51 in DHCP

I'm using this command: netsh dhcp server \\serverName 10.11.12.3 show optionvalue and am getting back two values for option 51: Changed the current scope context to 10.11.12.3 scope. Options for ...
0
votes
0answers
1k views

Set Multiple IP Addresses For DHCP Option 6 DNS Server Using Netsh

I am trying to set two IP addresses for option 6 DNS server using this code: $serverIpAddress = '11.12.13.14' $subnet = '11.12.43.33' $value = '11.12.74.21,11.12.74.22' netsh dhcp Server $...
2
votes
1answer
4k views

Prevent IIS Listing on Port 443 for Single IP Address

I am running a website in IIS and am also running another piece of software which streams media over port 1935 on the same server. The streaming software also has the capability of delivering content ...
0
votes
1answer
162 views

Set the default interface for routing / traffic

I have a Windows 2008 R2 (or newer, doesn't matter) server with IP 192.168.68.14/24 on interface "Ethernet0" / index 12. When adding the IP address 192.168.68.222/24 the interface 192.168.68.14 is ...
0
votes
1answer
1k views

Windows Server 2012 | Cannot connect | Network settings need to be reset

I currently rent out a Windows Server 2012 dedicated server off shore. I was trying to configure an additional IP address for my server so i was went to network sharing and adapter settings. From ...
1
vote
1answer
124 views

Making secondary Ip addres primary, without disrupting internet connectivity

I'm adding a secondary IP address with this command: netsh interface ipv4 add address "Ethernet" NewIp 255.255.255.0 After that, I want to make this address primary (default), without disrupting ...
1
vote
1answer
2k views

Multiple IP Addresses from DHCP

I have a problem with multiple processes needing to bind a TCP socket to the same port in Windows Server 2008. At the moment I believe this is causing some unexpected erratic behavior as a race ...
3
votes
0answers
327 views

Win7, add route with netsh without mentioning interface

I want to make a script for my team to add routes, but as each computer has its own set of interfaces so I can't know interface name/ID in advance. Is it possible to do with netsh(I know how to do it ...
0
votes
2answers
3k views

How to refresh netsh wlan show interface (while doing a wifi survey of the room)?

I like using the command netsh wlan show interface to quickly get info on my wifi connection. Does anyone know how I could have the output refresh every second? This would allow me to do a quick wifi ...
3
votes
2answers
4k views

How to use Windows netsh firewall command to allow only specific ipaddress on all port and deny all other ipaddress?

I require a configuration of firewall which will allow me connection through only specific ip-address say 10.0.0.1 on all port ranging from 0-5555 and deny all other ip-addresses? What will be the ...
2
votes
0answers
3k views

How to redirect IP address to another IP address using netsh windows tool?

My question is : how to redirect IP address to another IP address ex: 10.10.10.10 -> 20.20.20.20 (these IP are external) This answer shows me how to map IP adress to localhost. Can I redirect/route ...
9
votes
1answer
36k views

Can I redirect/route IP adress to another IP address (windows) [closed]

Can I map 146.112.61.106 IP address to my 127.0.0.1 adress ? so when I type 146.112.61.106 I got redirected to 127.0.0.1 ? (some netsh command maybe ?)
1
vote
0answers
132 views

IPsec Security Associations prevail even after IPsec tunnel is down

I am working on a script that can detect if existing IPsec tunnels on a system have gone down. From my observations, I have seen that it can take any where between 1 second to 8 minutes for this to be ...
0
votes
2answers
3k views

netsh command to add interface

I am working with Windows 2012 R2 Core and I having problems with setting up my NICs after they got reset. When I run "netsh int show int" it shows bother Interfaces as Enabled and Connected. ...
4
votes
1answer
4k views

Disable DHCPv6 client in Windows

I don't quite understand the link between 4 parameters related to IPv6 stateful and stateless autoconfiguration used under netsh int ipv6 set interface command context in Windows: advertise ...
0
votes
0answers
132 views

DHCP export using netsh

I'm trying to export a DHCP database using the following command: netsh dhcp server export c:\dhcpdb.dat all However it completes with the error WARNING: Could not obtain host information from ...
5
votes
2answers
2k views

Deallocated Azure VM Loses IPv4 DNS Address

I deallocate my development Azure VMs every night to conserve my credits. My VMs are all on one vnet using a domain controller. Since it is on the subnet, the domain controllers address never changes. ...