Differences between version 5 and previous revision of PortForwarding.
Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 5 | Last edited on Friday, July 7, 2006 2:14:21 pm | by CraigBox | Revert |
Older page: | version 4 | Last edited on Saturday, June 3, 2006 7:48:27 am | by AristotlePagaltzis | Revert |
@@ -1,12 +1 @@
-If you want to be able to run a process that responds to requests on a
[Port
] below 1024 without running it as the SuperUser, a simple approach is to have it bind to some port above 1024, then configure a lower layer in the NetworkStack to do the legwork
. On [Linux], a convenient way to achieve this is by using iptables(8):
-
-<pre>
-iptables --table nat -A PREROUTING -p tcp --dport <i>$external_port</i> -i eth0 -j REDIRECT --to-ports <i>$local_port</i>
-</pre>
-
-This way, you could have a process bind to port 8080 locally, but have it appear to outsiders as though it was listening on port 80.
-
-(Don’t forget to issue something like <tt>/etc/init.d/iptables save</tt> so this configuration won’t be lost on reboot.)
-
-----
-UserSubmittedNotes
+Describe
[PortForwarding
] here
.