Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [netsh]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
67 views

WiFi not working after adding a loopback address to WiFi interface in Windows

I think I did something that I was not supposed to do. While trying to learn something, I added a new loopback address to my WiFi interface in Windows without knowing what I'm doing. I typed the ...
Timotei Oros's user avatar
1 vote
1 answer
248 views

NETSH + WSL2: revert netsh-command and gain back WSL2-networking capabilities

Following this question I issued this command as an admin thorough PowerShell: netsh interface portproxy add v4tov4 listenport=4000 listenaddress=0.0.0.0 connectport=4000 connectaddress=(wsl hostname -...
scjorge's user avatar
  • 299
1 vote
0 answers
249 views

Windows PortProxy Issue After restart PC

I am using Windows, and problems occur on some PCs regardless of the OS. I added proxy information through: netsh interface add ... and it applied successfully and connected successfully. I checked ...
KwangHyeonKim's user avatar
2 votes
0 answers
58 views

Something so weird while using netsh

While using netsh, I am in an enterprise network and there are multiple bssids in the network, my device connects to the one that has the best signal by default behaviour as you know. (this is a big ...
C.Unbay's user avatar
  • 105
1 vote
0 answers
125 views

Routing all traffic to local socket server to act as a tunnel

I have developed a socket server in Python that runs on my Windows 11 device and another one on my cloud server. My goal is to tunnel all the traffic from my device to the cloud server through these ...
AmyyazdaN's user avatar
  • 121
0 votes
0 answers
60 views

Port forwarding cyclic rules

I am trying to use netsh command to port forward some ports so that I can redirect traffic from devices on my LAN to applications running locally. I have setup port forwarding via netsh netsh ...
de5tro's user avatar
  • 1
0 votes
0 answers
68 views

how to list _ALL_ rules allowing reply to incoming ICMP echo packet

Trying to list all %subj% rules. Problem is that netsh have parameter protocol on rule deletion netsh advfirewall firewall delete rule name=all protocol=icmpv4 but it HAVE NOT such parameter on rule ...
user2956477's user avatar
1 vote
0 answers
356 views

Set Windows Firwall to block all outbound but allow DHCP and web use

I am trying to set Windows firewall to block default public profile, but am having difficulty when outbound activity is set to block by default, despite including allow rules for DHCP and DNS. Failure ...
Sbolt_'s user avatar
  • 11
0 votes
1 answer
257 views

Create Hotspot Without WPA or Password

Setting up a network for my area to provide free WIFI, but there doesn't seem to be a way to create a hotspot without WPA2 even using the netsh commands with empty password like I see repeated 1000 ...
Kyle's user avatar
  • 1
0 votes
1 answer
186 views

Backup & Restore Winsock?

In the process of doing some troubleshooting and running the netsh winsock reset command, and was wondering if anyone is aware of a way (or app) to backup the current winsock catalog (and/or ...
J. Scott Elblein's user avatar
0 votes
1 answer
836 views

Blocking an ip with netsh

I know that netsh advfirewall firewall add rule name="name" dir=out remoteip=%IP% protocol=TCP action=block blocks the IP, and we can find the IP by simply pinging it. I used to use it to ...
mark's user avatar
  • 1
2 votes
0 answers
556 views

Can't remove port from excludedportrange

I cannot remove port 80 from excludedportrange. Here's the complete list of exclusions (run in elevated cmd): C:\Users\CptBartender>netsh int ipv4 show excludedportrange protocol=tcp Protocol tcp ...
CptBartender's user avatar
0 votes
0 answers
16 views

Facing an issue after running “netsh wlan show profiles” command [duplicate]

I want to retrieve password of an old WiFi connection but when I run `netsh wlan show profile command it shows: what should I do?
Muhammad Habibi's user avatar
1 vote
1 answer
381 views

How can I escape single quotes in cmd parameter?

I wanted to display a network profile in cmd using netsh, with netsh wlan show profile name="JohnDoe's iPhone". This WiFi name has an apostrophe in it, as you can see. The command responds ...
edddd's user avatar
  • 189
0 votes
1 answer
809 views

How do I create and setup a network interface for Windows 10 on a VPS?

I've installed Windows 10 on a VPS machine. Now I'm connected to the virtual terminal to access RDP and it says no internet connection. I've opened terminal and now looking at the interfaces so far, ...
User's user avatar
  • 841
0 votes
1 answer
3k views

Create batch to add firewall rules

Is there anyway to create a batch to run the following codes ? I made the batch file but not able to get the job done. :Allow IPV4 Ping netsh advfirewall firewall add rule name="ICMP ...
VB88's user avatar
  • 423
1 vote
2 answers
2k views

Connect if disconnected and disconnect if connected with batch [duplicate]

I'm trying to do a one-line batch command (for use with autohotkey with a keybaord shortcut) to: disconnect Wifi if it is connected: netsh wlan disconnect connect to SSID="MyWifi" if Wifi ...
Basj's user avatar
  • 1,860
0 votes
0 answers
4k views

netsh fails to set MTU

I'm trying to set the MTU for a Mellanox 100Gb NIC using netsh. The command works for small MTU values, but it fails for anything larger than 2000. The card is a ConnectX-6 and I know it supports ...
Elliott B's user avatar
  • 1,225
0 votes
1 answer
289 views

Network changes lost on quick hard reboot

On Windows 10, if I change the IP address and perform a hard reboot a few seconds later (cut the power and restart after some momemts) the change does not persist, i.e. the IP address is back to what ...
Michel's user avatar
  • 137
1 vote
1 answer
544 views

DOS batch file to display netsh channel output

I'm trying to get wifi Channel output from netsh command to be 2.4GHz or 5GHz The following provides me with Channel output: netsh wlan show interface name=Wi-Fi | findstr "Channel" Output ...
mnauta's user avatar
  • 11
0 votes
1 answer
3k views

Netsh wlan show profile name=NetworkName key= clear does not show WiFi Password

When I run Netsh wlan show profile name=NetworkName key=clear for some of the wifi networks listed with netshw wlan show profiles from an Admin command prompt the Security section shows Security Key ...
SimonKravis's user avatar
0 votes
0 answers
461 views

Windows terminal open on startup with proxy error

Every time I start my computer (Windows 11) windows terminal opened in C:\WINDOWS\system32\netsh.exe pops up with an error: Error writing proxy settings. (5) Access is denied. Current WinHTTP proxy ...
spec's user avatar
  • 1
0 votes
1 answer
5k views

Getting 169.254.31.218 IP address / can't ipconfig /release to change IP address

I can't figure this out and it's become a nightmare. A computer on our network has no internet. If I plug the problem computer in on another network the internet works. No other computers on the ...
manchakowski's user avatar
3 votes
1 answer
1k views

Windows Terminal opens on startup with proxy error

Note: This is a duplicate of When I Start my Windows 11 computer, the terminal pops up saying: Error writing proxy settings. (5) Access is denied which has no clear solution for this problem, as it ...
bzr's user avatar
  • 147
1 vote
1 answer
198 views

Can't get ip address with wmic command for PPPoP interface

I have tried to get ipv4 address of one of adapters, precisely from "PPPoP WAN Adapter" when it is connected, using wmic nic and wmic nicconfig commands but it didn't work. In general, when ...
KrzysztofJ's user avatar
0 votes
0 answers
319 views

Enable remote desktop in Windows 8

I am trying to enable Remote Desktop in my old Windows 8 laptop. I did not find a way to do it via GUI, as I do not have the settings shown everywhere (1, 2, etc.) This is what I have The second ...
sancho.s ReinstateMonicaCellio's user avatar
1 vote
2 answers
3k views

Access server hosted on 127.0.0.1 within Guest OS from the Host OS in VirtualBox

I have a ColdFusion server that launches on 127.0.0.1:WXYZ within a virtual machine on VirtualBox. I need to be able to access the server from my Host OS. I have tried using a Bridged adapter as well ...
Michael Pulis's user avatar
0 votes
0 answers
895 views

netsh.exe keeps popping on Windows 10

I am using Windows 10. The netsh.exe popup saying "The object already exists" shown in this image: It keeps popping up from time to time. It pops up and goes away. While I am working or ...
M. Usman Khan's user avatar
0 votes
0 answers
155 views

Windows 10: How to add Network Command Shell (netsh) to Firewall whitelist?

I use the netsh interface portproxy command to proxy connection into my VM. However, Windows Firewall blocks the connection. I know I can use the netsh advfirewall command to poke a hole. But I would ...
some user's user avatar
  • 2,507
1 vote
2 answers
608 views

PowerShell Script That Toggles Network Connection

I want to write a Powershell script that acts as a toggle for a connection to the internet each time it is run. I wrote this, which works: $isconnected = netsh wlan show interfaces | select-string ...
EllipticalInitial's user avatar
1 vote
1 answer
688 views

Reset network settings

In Windows, I ran the command netsh interface ipv4 set address name="Wi-Fi" static 192.168.3.8 255.255.255.0 192.168.3.1. I didn't really know what I was doing and now my Internet is not ...
YJiqdAdwTifMxGR's user avatar
2 votes
2 answers
252 views

Combining batch files so double click performs one operation and the next double click reverses or performs the next operation?

So I have two separate batch files. One to disable the NIC and enable the wifi card: @netsh interface set interface name="Ethernet" admin=disabled @netsh interface set interface name="...
darien.day's user avatar
0 votes
0 answers
430 views

Windows 10 no internet access with 4G dongle & LAN

I have the following setup on a remote computer: Ethernet connection: only for local network - no internet access 4G dongle: internet access When combining the two, I don't have internet access. ...
wouter205's user avatar
  • 101
1 vote
1 answer
510 views

How to add multiple IPv6 addresses to an interface in Windows?

I can add addresses to an interface using netsh interface ipv6 add address SomeInterface SomeIPv6Address Can I somehow add a range of ipv6 addresses e.g. 2001:db8:0000:0000:0000:0000:0000:0001 to ...
Hexception's user avatar
0 votes
1 answer
1k views

Local port forwarding - macOs Big Sur

I need to forward all traffic going to 127.0.0.1:5432 to 192.168.1.103:543 on macOS Big Sur. Similar command on Windows is netsh interface portproxy add v4tov4 listenaddress=127.0.0.1 listenport=5432 ...
JaSHin's user avatar
  • 101
0 votes
2 answers
531 views

Understanding IP address assignment and routing of hosted network

The hosted network ("Wifi tethering" or "wireless access point") can be enabled with: netsh wlan set hostednetwork mode=allow ssid=[name] key=[password] netsh wlan start ...
divB's user avatar
  • 587
1 vote
2 answers
844 views

netsh advfirewall command was not found

I have an advanced rule setup in Windows firewall that I want to be able to turn on and off via an AutoHotkey script. RunWaitOne(command) { shell := ComObjCreate("WScript.Shell") ...
Stegathesaurus's user avatar
16 votes
1 answer
5k views

Find who excluded port range

When trying to start docker container, the following errors is shown: Cannot start service <service>: Ports are not available: listen tcp 0.0.0.0:5601: bind: An attempt was made to access a ...
cdalxndr's user avatar
  • 260
1 vote
1 answer
7k views

What is the exact equivalent of this netsh Windows command for MAC? The command is attached in the body

I want to block all networks from my PC with admin access and make it so that the user cannot reverse the changes. I will use admin access to only white list certain networks that will be visible to ...
Muhammad Huzaifa's user avatar
0 votes
0 answers
54 views

How to set different TTLHOP for TCP ports

We want to set sensitive TCP/UDP Ports at low TTL/HOP Leaving other ttl/hop at 128 default data center = 3 Priv net = 8 Internet = 128 default Ssh 22 = 8 (internal hop max) Rdp 3389 = 8 Http 80 = 128 (...
Bill Alderson's user avatar
4 votes
1 answer
541 views

Performing network connection "diagnose" / "troubleshoot" via command line in Windows

Is there a way in command line to do the steps that Windows 10 does when you right click a network connection and choose "diagnose" or when you tell it to troubleshoot a connection? I'm ...
g491's user avatar
  • 514
34 votes
11 answers
106k views

Make IP address of WSL2 static

I am running an SSH server within WSL2 on a WIN10 machine. To make that work I am using: netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=22 connectaddress=172.19.237.178 ...
Nick's user avatar
  • 1,443
0 votes
1 answer
2k views

netsh advfirewall can not set group profile

Windows Server 2008 R2 Standard, 64 bit. Powershell version 5.1.144049. Trying to use a command from this Microsoft Support Page -> Example 8: Enable specific services netsh advfirewall firewall ...
Ubernator's user avatar
  • 101
1 vote
1 answer
4k views

Change metric of a disconnected interface with netsh

I am creating a Wapt_package to deploy VPN Interface on our user's terminal. I create the VPN interface without issue, but we need to set the metric of the vpn interface to 1. add-VPNConnetionRoute -...
LMS's user avatar
  • 11
0 votes
0 answers
956 views

Slow Internet Speed Windows 10 NETSH WINSOCK fixes it

So I have stumbled upon an extremely annoying task I have to do everyday and that is to run netsh winsock reset catalog everytime I boot into Windows. I have no idea why this has come about but its ...
Dr Schizo's user avatar
  • 101
0 votes
1 answer
94 views

What does the parameter -c for netsh actually do?

The Microsoft Doc says "-c Optional. Specifies that netsh enters the specified netsh context." I don't understand what the context means here. Could anyone explain this parameter for me? I would ...
microbit's user avatar
2 votes
1 answer
373 views

Internet Connection Sharing + Port Forwarding range

I'm using Internet Connection Sharing from a Windows 10 computer in order to give a device internet connection and would like to use port forwarding from this connection as well but I need to add a ...
John Doe's user avatar
0 votes
1 answer
2k views

How to route tcp traffic from all/range of ports to a single port?

I would like to do something that's possible with IPTABLES(for linux), on a Windows 10 - that is to route multiple ports to a single port. I thought I'd manage to do it with netsh, but it doesn't ...
toti's user avatar
  • 121
1 vote
1 answer
99 views

How to connect/disconnect a network not found by netsh?

I use a network which can be found with ipconfig but cannot with netsh wlan show networks or netsh wlan show interfaces. I assume this may not be a wlan network but something else. I know it's ...
Peter.k's user avatar
  • 129
1 vote
1 answer
1k views

Exclude route from netsh interface

My setup is as follows: Windows 10, Corona forced home office, I'm an external contractor at a huge company I'm connecting to the VPN of my company, called MyVPN, some internal IPs of our client are ...
Reeno's user avatar
  • 137

1
2 3 4 5