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
Below is the lsof on port 502...
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
reciever. 10273 root 3u IPv4 49966 TCP
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?