Is there a way for non-root processes to bind to “privileged” ports on Linux?

后端 未结 24 1266
予麋鹿
予麋鹿 2020-11-22 02:04

It\'s very annoying to have this limitation on my development box, when there won\'t ever be any users other than me.

I\'m aware of the standard workarounds, but non

24条回答
  •  终归单人心
    2020-11-22 02:46

    At startup:

    iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
    

    Then you can bind to the port you forward to.

提交回复
热议问题