Allowing port access on Windows

6,083

Solution 1

Connectivity may be blocked by Windows Firewall or other third-party firewall software, including a firewall component that might be part of some antivirus software. If it is being blocked by the Microsoft Windows Firewall software, you can open the port using a netsh advfirewall command. From an admin command prompt, you could issue the command below (put it all on one line):

 netsh advfirewall firewall add rule name="Message Broker" dir=in
 action=allow protocol=TCP localport=1883

The name for the rule could be "Message Broker" or anything you like that makes the purpose of the firewall rule clear. For any application that uses UDP rather than TCP, you can change the value for "protocol" to "UDP", or you can use protocol=any to allow both UDP and TCP connectivity.

Solution 2

You will probably have to enable the TCP or UDP port 1883 in Windows Firewall with Advanced Security which is found in Control Panel among Administrative Tools. Add an In-bound rule on the PC where the service runs to allow the incoming requests to 1883 to pass through the firewall.

enter image description here

Share:
6,083

Related videos on Youtube

user2627156
Author by

user2627156

Updated on September 18, 2022

Comments

  • user2627156
    user2627156 over 1 year

    I have a message broker running on my computer on port 1883. I tried to telnet that port (to test its accssibility) from a computer on the same network but that didn't work.

    How can I allow other computers on the same network to connect to the broker on that port?

    thanks

    • Admin
      Admin almost 9 years
      Forward the port on the networking equipment
    • Admin
      Admin almost 9 years
      Did you open the port in Advanced Firewall configuration? Try to disable Windows Firewall temporarily to see if it helps.
    • Admin
      Admin almost 9 years
      @Ramhound On the same local network? That will not be necessary.
  • user2627156
    user2627156 almost 9 years
    I did this but didn't reoslve it. should i restart the computer so that it has an effect?
  • moonpoint
    moonpoint almost 9 years
    @user2627156, you should not need to restart the system after adding a firewall rule. Verify that your system is actually listening on port 1883 on all network interfaces by issuing the command netstat -an | find "1883" | find "LISTENING" at a command prompt. You should see a result like TCP 0.0.0.0:1883 0.0.0.0:0 LISTENING. If you can see that the application is listening on the relevant port, you could try turning the firewall software off temporarily, if it is safe to do so on the system, i.e., if doing so wouldn't make the system vulnerable to the Internet.
  • Vojtěch Dohnal
    Vojtěch Dohnal almost 9 years
    @user2627156 On client PC enable outgoing rule or disable firewall too. No restart needed.
  • Vojtěch Dohnal
    Vojtěch Dohnal almost 9 years
    There is a handful sysinternals utility called tcpview to see open ports...