[CentOS] [Fwd: How to listen port under 1024 with non-root user]

bryan davis bdavis at skymailer.skyauction.com
Thu Jul 6 04:25:09 UTC 2006


You can also use iptables to redirect the packets

/sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp -d <your ip> --dport 
25 -j REDIRECT --to-port <high port your script listens on>

I've used this for java programs in the past.

----- Original Message ----- 
From: "dxuranus" <dxuranus at gmail.com>
To: "centos" <CentOS at centos.org>
Sent: Wednesday, July 05, 2006 7:56 PM
Subject: [CentOS] [Fwd: How to listen port under 1024 with non-root user]


>I make a simple mail program which need listen port 25 and 110.but i
> found it's imposible , after searching with google i found non-root user
> can't listen port under 1024.at first i try a script(witch lauch my
> program) and use setuid but that still did't work.any way can handle
> this.
> Thanks for any help.
>


--------------------------------------------------------------------------------


> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
> 





More information about the CentOS mailing list