Mailinglist Archive: opensuse (5130 mails)

< Previous Next >
opening up reserved ports for non-registered custom applications
  • From: "Brandon Spruth" <brandon@xxxxxxxxx>
  • Date: Mon, 1 May 2006 11:16:15 -0500 (CDT)
  • Message-id: <27920.4.17.193.130.1146500175.squirrel@xxxxxxxxxxxx>
Has anyone had any experience opening up non-standard applications on
ports below 1024? I have a situation now that I need to open up port 502
on a custom application, however starting up the app as a root user and
opening up the ports on iptables does not seem to do the trick. Below are
my iptables rules and a lsof of the app running on 502.

iptables -A INPUT -i eth0 -p tcp --sport $unprivports -d $ext_ip --dport
502 -m state --state NEW -j ACCEPT

iptables -A OUTPUT -o eth0 -p tcp ! --syn -s $ext_ip --sport 502 --dport
$unprivports -j ACCEPT

listing of my iptables on port 502...

ACCEPT tcp -- 0.0.0.0/0 192.168.0.2 tcp
spts:1024:65535 dpt:502 state NEW

ACCEPT tcp -- 192.168.0.2 0.0.0.0/0 tcp spt:502
dpts:1024:65535 flags:!0x17/0x02

Below is the lsof on port 502...

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
reciever. 10273 root 3u IPv4 49966 TCP
2-0-168-192.example.com:custom_application (LISTEN)

For some reason I am not able to access this port regardless that the
firewall is open on the port. Am I missing anything here?
--------------------
Brandon Spruth
brandon@xxxxxxxxx



< Previous Next >