chumeng 2011-08-14
linux下,1024以下的端口只有root权限用户才能用,这导致一个普通用户无法启动80端口的apache,修改iptables配置可达到目的,例如我的apache端口是8888
vi/etc/sysconfig/iptables
*nat
:PREROUTINGACCEPT[520:36561]
:POSTROUTINGACCEPT[961:78067]
:OUTPUTACCEPT[960:78007]
-APREROUTING-ptcp-mtcp--dport80-jREDIRECT--to-ports8888
-APREROUTING-d127.0.0.1-ptcp-mtcp--dport80-jREDIRECT--to-ports8888
-AOUTPUT-d127.0.0.1-ptcp-mtcp--dport80-jREDIRECT--to-ports8888
COMMIT