Differences between version 3 and revision by previous author of PortForwarding.
Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History
Newer page: | version 3 | Last edited on Saturday, September 11, 2004 3:22:57 pm | by CraigBox | Revert |
Older page: | version 2 | Last edited on Monday, July 28, 2003 6:05:37 pm | by DavidHallett | Revert |
@@ -1,13 +1,13 @@
After asking PerryLorier about allowing a user process to bind to port 80, the response that he and JohnMcPherson gave didn't leave me feeling all too inspired about achieving the task without stress and fatigue.%%%
%%%
-<[
Bryin]
> [
Isomer]
: Do you know how to let user processes bind to ports < 1024%%%
-<@[
Isomer]
> [
Bryin]
: run as root?%%%
-<@[
Isomer]
> or give them cap_net IIRC%%%
-<kinko> [
Bryin]
: only root can... normally your program is setuid root, and after binding to the port it immediately changes to nobody or some other normal user%%%
-<@[
Isomer]
> [
Bryin]
: the answer is, normally it doesn't work very well at all.%%%
-<@[
Isomer]
> as root you can give yourself the cap_net_bind privilege, then change user, keeping that privilege%%%
-<[
Bryin]
> I'll wiki this when I find a tidy solution%%%
+<Bryin> Isomer: Do you know how to let user processes bind to ports < 1024%%%
+<@Isomer> Bryin: run as root?%%%
+<@Isomer> or give them cap_net IIRC%%%
+<kinko> Bryin: only root can... normally your program is setuid root, and after binding to the port it immediately changes to nobody or some other normal user%%%
+<@Isomer> Bryin: the answer is, normally it doesn't work very well at all.%%%
+<@Isomer> as root you can give yourself the cap_net_bind privilege, then change user, keeping that privilege%%%
+<Bryin> I'll wiki this when I find a tidy solution%%%
After this dialogue on the [IRC] channel of [#wlug], I proceeded to think about cats and skinning. I then realised, "There is another solution!".
I had decided I was going to make the application (a [Java] server) bind to port 8080 and get the OperatingSystem to perform the legwork.