0

I'm dealing with a RHEL version 6.4 server's firewall setting and the goal is to allow remote device to connect tcp port 6162, regardless of the type of services.

The iptables rules are shown below(iptables -L --line-numbers), and service iptables has been restarted.

num  target     prot opt source               destination
1    ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
2    ACCEPT     icmp --  anywhere             anywhere
3    ACCEPT     all  --  anywhere             anywhere
4    ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
5    ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:6160
6    ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:patrol-coll

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination

Also, I did set the port I want in sytem-config-firewall, as shown figure below. enter image description here

The strange thing is:

No matter how I set the firewall/iptable, the port 6162 just couldn't be opened. It has been tested with telnet client of windows/linux remote hosts that are residing in the same IP subnet of this RHEL 6.4 server. The connection to port 6162 is refused but others worked(such as port 6160).

Tcp port 6162 seemed to be always "patrol-coll" but strictly speaking, I wanna allow any type of services to connect the 6162 port, not just "patrol-coll". Don't know whether the service type does impact on the connection...

Can anyone please provide some hints to troubleshoot the OS-side problem of the connection please?

Notes1: the output of netstat -tulpn is shown below.

Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      2538/rpcbind
tcp        0      0 192.9.110.1:1521            0.0.0.0:*                   LISTEN      4806/tnslsnr
tcp        0      0 0.0.0.0:37426               0.0.0.0:*                   LISTEN      4493/ora_d000_SOGOE
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      2917/sshd
tcp        0      0 0.0.0.0:46775               0.0.0.0:*                   LISTEN      4686/ora_d000_SOGOL
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      2737/cupsd
tcp        0      0 127.0.0.1:10808             0.0.0.0:*                   LISTEN      3126/veeamservice
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      3007/master
tcp        0      0 127.0.0.1:6010              0.0.0.0:*                   LISTEN      4046/sshd
tcp        0      0 127.0.0.1:199               0.0.0.0:*                   LISTEN      2869/snmpd
tcp        0      0 0.0.0.0:37449               0.0.0.0:*                   LISTEN      2657/rpc.statd
tcp        0      0 :::111                      :::*                        LISTEN      2538/rpcbind
tcp        0      0 :::6160                     :::*                        LISTEN      2886/veeamdeploymen
tcp        0      0 :::40976                    :::*                        LISTEN      2657/rpc.statd
tcp        0      0 :::22                       :::*                        LISTEN      2917/sshd
tcp        0      0 ::1:631                     :::*                        LISTEN      2737/cupsd
tcp        0      0 ::1:25                      :::*                        LISTEN      3007/master
tcp        0      0 ::1:6010                    :::*                        LISTEN      4046/sshd
udp        0      0 0.0.0.0:111                 0.0.0.0:*                               2538/rpcbind
udp        0      0 127.0.0.1:2547              0.0.0.0:*                               4495/ora_s000_SOGOE
udp        0      0 0.0.0.0:631                 0.0.0.0:*                               2737/cupsd
udp        0      0 0.0.0.0:1017                0.0.0.0:*                               2538/rpcbind
udp        0      0 127.0.0.1:13179             0.0.0.0:*                               4660/ora_pmon_SOGOL
udp        0      0 10.50.89.26:123             0.0.0.0:*                               2925/ntpd
udp        0      0 192.9.110.1:123             0.0.0.0:*                               2925/ntpd
udp        0      0 127.0.0.1:123               0.0.0.0:*                               2925/ntpd
udp        0      0 0.0.0.0:123                 0.0.0.0:*                               2925/ntpd
udp        0      0 0.0.0.0:28426               0.0.0.0:*                               4672/ora_lgwr_SOGOL
udp        0      0 0.0.0.0:18843               0.0.0.0:*                               2657/rpc.statd
udp        0      0 0.0.0.0:161                 0.0.0.0:*                               2869/snmpd
udp        0      0 127.0.0.1:22464             0.0.0.0:*                               4688/ora_s000_SOGOL
udp        0      0 0.0.0.0:9798                0.0.0.0:*                               4479/ora_lgwr_SOGOE
udp        0      0 0.0.0.0:713                 0.0.0.0:*                               2657/rpc.statd
udp        0      0 127.0.0.1:48982             0.0.0.0:*                               4467/ora_pmon_SOGOE
udp        0      0 127.0.0.1:26208             0.0.0.0:*                               4686/ora_d000_SOGOL
udp        0      0 127.0.0.1:54112             0.0.0.0:*                               4493/ora_d000_SOGOE
udp        0      0 :::111                      :::*                                    2538/rpcbind
udp        0      0 :::1017                     :::*                                    2538/rpcbind
udp        0      0 fe80::20c:29ff:fe74:83b5:123 :::*                                    2925/ntpd
udp        0      0 fe80::20c:29ff:fe74:83bf:123 :::*                                    2925/ntpd
udp        0      0 ::1:123                     :::*                                    2925/ntpd
udp        0      0 :::123                      :::*                                    2925/ntpd
udp        0      0 :::46340                    :::*                                    2657/rpc.statd```

3
  • if you run netstat, you can see something listening on that port? Aug 1, 2023 at 4:10
  • @JaromandaX I put it into the content. Couldn't find port 6162.
    – user53815
    Aug 1, 2023 at 6:04
  • 1
    what do you expect to be listening on port 6162? If nothing is listening on that port, then how can anything connect to that port? Aug 1, 2023 at 6:08

1 Answer 1

1

Your port 6160 works because it seems to have a Veeam Installer Service running (process name is something like veeamdeploymen* according to your netstat -tulpn output).

Because there is no service running on port 6162 yet, the port will not open, although you seem to have already have unblocked it in firewall settings.

Although someone might say "open a port in a firewall", that is a bit of a misnomer: a firewall does not really open ports, instead it can block them so that a port cannot be accessed even if an application opens it. If you don't have any network services running, all network ports will be closed by the operating system alone, and a firewall cannot change that.

By requiring you to effectively configure any legitimate network port access twice (once to activate the service itself, then to unblock it in firewall settings), a firewall minimizes the risk of accidentally allowing unintended access.

A firewall cannot reliably determine which remote application or service is attempting to connect: even if there was a protocol to allow that, the remote system can always tell lies. The Service field is probably just a human-friendly label assigned for a specific port number, typically in /etc/services.

Some firewall management solutions will also allow pre-defining groups of port numbers as "services", for ease of configuration.

If you want to open the port temporarily for test purposes, the "netcat" utility (package name nc) can do it:

To open port 6162 for an incoming TCP connections:

nc -kl 6162

Or if you want to open the port for UDP packets:

nc -kul 6162

Once the command is stopped (with a Ctrl+C or a kill command), the port will automatically close again as there will no longer be a process present to handle any incoming data. Any data sent to the port over the network connection will be emitted to standard output; if you don't want that, you can append >/dev/null to the nc command lines.

Note: the port TCP/6162 is the default port for Veeam Data Mover, however the fact that your system indicates a service name of patrol-coll suggests some other software might (once have) be(en) configured to use that port. (Perhaps a statistics collector of BMC Patrol monitoring software?)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .