Skip to content
This repository has been archived by the owner on Oct 27, 2021. It is now read-only.

Add section about using authbind #213

Open
joschi opened this issue Oct 20, 2016 · 7 comments
Open

Add section about using authbind #213

joschi opened this issue Oct 20, 2016 · 7 comments

Comments

@joschi
Copy link
Contributor

joschi commented Oct 20, 2016

People regularly struggle with the concept of privileged ports and how to allow Graylog to bind to these (e. g. port 514 for syslog).

@bernd
Copy link
Member

bernd commented Oct 20, 2016

Using setcap could be an alternative, although it's not as nice because you have to allow all Java programs to bind to privileged ports.

https://blogs.oracle.com/sduloutr/entry/binding_a_server_to_privileged

@bubba198
Copy link

bubba198 commented Oct 26, 2016

I did read the technical explanation and it does not sound credible; if this was a java issue binding to lower ports how does it bind to 514 then?

ok after some tinkering I discovered that the OVA which ships with 2.1.0+62db7e0, codename Smuttynose uses authbind to make it work on 514 so that's how they get it going. Hence I only had to add UDP 162 to the authbind-by-port config and that allowed me to run the snmp plug-in as native 162 listener. Remember to use "!" when specifying a UDP port for authbind-by-port:

touch '/etc/authbind/byport/!162'
chmod 500 '/etc/authbind/byport/!162'
chown graylog '/etc/authbind/byport/!162'

Remember to surround the path with '' because of the ! used in front of the numeric port for UDP. If you do NOT use ! then the port will be TCP and snmp plug-in won't work since snmp is UDP to begin with. Hope that help others to get their plug-in going for native snmp.

ubuntu@graylog:/etc/authbind/byport$ ls -la
total 8
drwxr-xr-x 2 root    root    4096 Oct 26 15:33 .
drwxr-xr-x 5 root    root    4096 Oct 26 07:22 ..
-r-x------ 1 graylog graylog    0 Oct 26 15:19 !162
-r-xr-x--- 1 graylog graylog    0 Sep 21 13:35 !514
ubuntu@graylog:/etc/authbind/byport$

@joschi
Copy link
Contributor Author

joschi commented Oct 27, 2016

@bubba198 Please don't hijack this issue. Privileged ports are not a "Java issue" but simply restriction of the network stack of the operating system.

You can read up on privileged ports at https://www.w3.org/Daemon/User/Installation/PrivilegedPorts.html

jalogisch added a commit that referenced this issue Dec 12, 2016
as we do not have any information in our documentation for authbind or how to run inputs on unpriviliges ports we should have at least a small comment in the FAQ.

The final goal would be to have a page in the configuration area that explains how to use this all and how to configure the different options that can be found in: #213
joschi pushed a commit that referenced this issue Dec 13, 2016
As we do not have any information in our documentation for `authbind` or how to run inputs on unprivileged ports we should have at least a small comment in the FAQ.

The final goal would be to have a page in the configuration area that explains how to use this all and how to configure the different options that can be found in: 

#213
@joschi
Copy link
Contributor Author

joschi commented Jan 27, 2017

@miztroh-zz
Copy link

Or just add a port forward:

firewall-cmd --zone=public --add-masquerade
firewall-cmd --zone=public --add-forward-port=port=443:proto=tcp:toport=9000 --permanent
firewall-cmd --reload

This seems a lot more straightforward than having to install and configure authbind.

@joschi
Copy link
Contributor Author

joschi commented Feb 14, 2018

@miztroh-zz
Copy link

@joschi Bingo.

eightnoneone pushed a commit to eightnoneone/documentation that referenced this issue Apr 20, 2020
As we do not have any information in our documentation for `authbind` or how to run inputs on unprivileged ports we should have at least a small comment in the FAQ.

The final goal would be to have a page in the configuration area that explains how to use this all and how to configure the different options that can be found in: 

Graylog2#213
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants