help with Windows 10/11 and port forwarding

mrjayviper

Weaksauce
Joined
Jul 17, 2012
Messages
91
What I want: I want to be able to access the UI on port=80 on but on a 2nd PC.

setup info:
  • The PC running the service is connected to my router via a Wi-Fi adapter (DHCP IP: 192.168.1.12)
  • The 2nd PC (actually an MBP) is connected to the same router via Wi-Fi (DHCP: 192.168.1.*)
  • I have no problems browsing the internet on both PCs.
  • The app on the 1st PC is listening to port=9000.
  • Windows Firewall has been disabled on the 1st PC (https://i.stack.imgur.com/mOGPq.jpg)
things I tried:
  1. on my local browser, I can view the app UI via localhost:9000.
  2. With 1st netsh rule (see below), I am able to access the web UI via port=80 locally. Without this rule, I am getting an error on my browser (which is expected).
  3. Using the 2nd netsh command (see below), I was trying to access the web UI via port=80 but on a 2nd PC. I am getting nothing on the 2nd PC.
Any ideas? Thanks

Code:
    => ipconfig

    Windows IP Configuration

    Wireless LAN adapter Wi-Fi:
    Connection-specific DNS Suffix  . :
    IPv4 Address. . . . . . . . . . . : 192.168.1.12
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Default Gateway . . . . . . . . . : 192.168.1.254

    => netsh interface portproxy add v4tov4 listenport=80 listenaddress=127.0.0.1 connectport=9000 connectaddress=127.0.0.1
        
    => netsh interface portproxy add v4tov4 listenport=80 listenaddress=192.168.1.12 connectport=9000 connectaddress=127.0.0.1
    
    => netsh interface portproxy show all
    
    Listen on ipv4:             Connect to ipv4:
    
    Address         Port        Address         Port
    --------------- ----------  --------------- ----------
    127.0.0.1       80          127.0.0.1       9000
    192.168.1.12    80          127.0.0.1       9000


    => netstat -aon -p tcp
      Proto  Local Address          Foreign Address        State           PID
      TCP    192.168.1.12:80        0.0.0.0:0              LISTENING       3744
     (I've removed all netstat output which I thought were not relevant)
 
If you are trying to access from another PC.. then I don't believe the "connectaddress" can be 127.0.0.1
127.0.0.1 is normally local/loopback typically..

What would happen... or if you are able to set "connectaddress=192.168.1.12" ?
netsh interface portproxy add v4tov4 listenport=80 listenaddress=192.168.1.12 connectport=9000 connectaddress=192.168.1.12
 
correct, 127.0.0.1 can not be used, that is the loopback address.

You need to use the IP of the system hosting the app.

Also, the app, do you need to configure it to listen on the IP vs the loopback (most you do not) and if you want to use port 80 instead of 9000, is the app configured to listen on 80?

What app is it?
 
Shutting of the firewall in Windows doesnt actually shut it off in some cases. If the above corrected command doesn't help I would enable the firewall then alter the firewall rules using the wizard to put in the info you want. Also if plugged into an all in one router, make sure there are no blocking rules there. Just because they are on the same LAN doesn't mean its not applying any protections.
 
This isn't a firewall issue at all. If both PCs are on the same LAN port 80 will work. If these PCs are Internet facing turn it back on because you're probably exposing port 80 to the wild Internet.

You are absolutely using the wrong IP address.
 
Back
Top