Re: PSA: Simple Wi-Fi gateway killswitch that works with OpenVPN config files
Maria Sophia <[email protected]> Fri, 24 Jul 2026 10:59:41 -0700
| Newsgroups | alt.comp.os.windows-10,alt.comp.os.windows-11,alt.comp.microsoft.windows |
|---|---|
| Organization | BWH Usenet Archive (https://usenet.blueworldhosting.com) |
| Message-ID | <[email protected]> |
As a related aside, if your network ever does go to hell in a handbasket, the following manual commands seem to surgically fix mine in a flash. I renamed interfaces so that I don't have to deal with spaces: netsh interface set interface name="Ethernet 2" newname="eth0" netsh interface set interface name="Wi-Fi 2" newname="wlan0" Set your network for Ethernet (in my case, via a wireless router): netsh interface set interface "wlan0" admin=disabled netsh interface set interface "eth0" admin=enabled netsh interface ipv4 set address name="eth0" static 192.168.1.15 255.255.255.0 192.168.1.1 netsh interface ipv4 set dns name="eth0" static 1.1.1.1 netsh interface ipv4 add dns name="eth0" 1.0.0.1 netsh interface ipv4 show dnsservers netsh interface ipv4 show config name="eth0" netsh interface ipv4 show config netsh interface ipv4 show dnsservers ping -n 1 192.168.1.1 ping -n 1 1.1.1.1 ping -n 1 www.google.com wmic nic where (NetEnabled=true) get Name, Speed curl -o NUL http://speedtest.tele2.net/1MB.zip curl -o NUL http://speedtest.tele2.net/10MB.zip curl -o NUL http://speedtest.tele2.net/100MB.zip speedtest.exe (from <https://www.speedtest.net/apps/cli>) route print -4 ipconfig /all At this point you can now run psiphon.bat or vpn.bat Set your network for Wi-Fi (in my case, via a Wi-Fi NIC card): netsh interface set interface "eth0" admin=disabled netsh interface set interface "wlan0" admin=enabled netsh interface ipv4 set address name="wlan0" static 192.168.1.16 255.255.255.0 192.168.1.1 netsh interface ipv4 set dns name="wlan0" static 1.1.1.1 netsh interface ipv4 add dns name="wlan0" 1.0.0.1 netsh wlan connect name="my.ssid_nomap" netsh wlan connect name="starbucks.office_nomap" netsh interface ipv4 show config netsh interface ipv4 show config name="wlan0" netsh interface ipv4 show dnsservers ping -n 1 192.168.1.1 ping -n 1 1.1.1.1 ping -n 1 www.google.com wmic nic where (NetEnabled=true) get Name, Speed curl -o NUL http://speedtest.tele2.net/1MB.zip curl -o NUL http://speedtest.tele2.net/10MB.zip curl -o NUL http://speedtest.tele2.net/100MB.zip speedtest.exe (from <https://www.speedtest.net/apps/cli>) route print -4 ipconfig /all At this point you can now run psiphon.bat or vpn.bat ============================================================ Here's a networking cheat sheet if anyone needs the commands. ============================================================ Layer 1: link & adapter state check NIC driver + link status wmic nic get Name,NetEnabled,Speed show adapter statistics (errors/drops) netstat -e show interface statistics netsh interface ipv4 show interfaces ============================================================ Layer 2: arp & neighbor discovery show arp table arp -a show ipv4 neighbor cache netsh interface ipv4 show neighbors ============================================================ Layer 3: ip configuration & routing show ipv4 global settings netsh interface ipv4 show global show ipv4 addresses netsh interface ipv4 show address show routing table (ipv4 only) route print -4 show active tcp/udp endpoints netstat -an ============================================================ Layer 4: dhcp check dhcp server discovery netsh dhcp show server show dhcp-assigned addresses netsh interface ip show addresses force dhcp renew ipconfig /release && ipconfig /renew ============================================================ Layer 5: dns test dns resolution nslookup example.com show dns cache ipconfig /displaydns flush dns cache ipconfig /flushdns ============================================================ Layer 6: firewall show firewall rules netsh advfirewall firewall show rule name=all show firewall profile state netsh advfirewall show allprofiles ============================================================ Layer 7: winsock show winsock providers netsh winsock show catalog reset winsock (fixes corruption) netsh winsock reset ============================================================ Layer 8: connectivity tests ping gateway ping <gateway> ping ipv4-only target ping -4 8.8.8.8 trace ipv4 route tracert 8.8.8.8 test ipv4 http curl -4 http://example.com ============================================================ Layer 9: system logs open event viewer eventvwr.msc check dhcp logs (event viewer ¡÷ microsoft ¡÷ windows ¡÷ dhcp-client) check tcp/ip logs (event viewer ¡÷ system ¡÷ tcpip) check ndis driver logs (event viewer ¡÷ system ¡÷ ndis) ============================================================ Layer 10: advanced routing & bindings show interface metrics netsh interface ipv4 show interfaces show binding joins netsh interface ip show joins show tcp global parameters netsh interface tcp show global =========================================================== -- Some people are on Usenet for their own amusement but others are on Usenet to help others daily and to learn from them.