problem opening ports 8443 and 3000 on linux-ubuntu

douglas rodriguez 0 Reputation points
2024-05-02T22:02:01.03+00:00

I need to open port 3000 and port 8443, I used the network manager in order to open those ports on 2 different linux-unbuntu servers and the manager shos me that the ports are open but I'm unable to open them using ssh or using the web browser with the public IP.

I'd like to know if somebody has had the same problem

Microsoft Intune Linux
Microsoft Intune Linux
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Linux: A family of open-source Unix-like operating systems.
53 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AlexZhu-MSFT 5,956 Reputation points Microsoft Vendor
    2024-05-03T06:13:36.4766667+00:00

    Hi,

    If we access from outside, the packet path is:

    (outside packet) --> gateway firewall (port forwarding) --> ubuntu server firewall (exception is added) --> the desired program

    For this issue, we can try the 3-step troubleshooting:

    1, in one of the ubuntu servers, use netstat -ntlp to show all the listening ports and program, and we need make sure the desired program is in it.

    use following command to open these ports in the firewall. If you have already done this through network manager, skip this.

    note: the command may differ among different distros of linux

    firewall-cmd --zone=public --add-port=<port>/tcp --permanent

    firewall-cmd reload

    2, in the other ubuntu server (assuming they are in the same subnet), run the following command to test the port. If pass, continue with next step, otherwise, check the ubuntu server firewall settings.

    nc -vz <ip address of the first ubuntu server> <port>

    3, if we want to access from outside of the subnet, we need to configure the port forwarding in the gateway to allow the traffic.

    note: the gateway could be windows/linux comptuer, router or something similar, either on-premises or in the cloud. Here, took a linux gateway as an example, just to illustrate how it works:

    After the port forwarding is set, test the port from outside computer to see if it works.

    image1: get listening port

    netstat_command

    image2: add firewall rule to allow the trafficscom_linux_port_1270_centos

    image3: nc command

    sccm_linux_nc_command_new

    image4: port forwarding sample in the linux gateway via iptables

    iptables_debian7

    image5: test from outside via windows powershell (the same functionality as linux nc commad)

    test_netconnection_445

    Regards,

    Alex


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.