Allowing Uncommon Ports on SELinux
Allowing Uncommon Ports on SELinux
Hi,
I'm using CentOS 7. I need to allow some uncommon ports like 3000 etc. I know how to enable those n firewall using firewall-cmd command , but for SELinux it's bit confusing.
To allow http service to run on port 8001 I can use "semanage port -a -t http_port_t -p tcp 8001" command
But for a particular port how can I do that?
Thanks
I'm using CentOS 7. I need to allow some uncommon ports like 3000 etc. I know how to enable those n firewall using firewall-cmd command , but for SELinux it's bit confusing.
To allow http service to run on port 8001 I can use "semanage port -a -t http_port_t -p tcp 8001" command
But for a particular port how can I do that?
Thanks
Re: Allowing Uncommon Ports on SELinux
Exactly like that.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: Allowing Uncommon Ports on SELinux
Hi TrevorH,
Thanks for the information. That means the tag "-a -t http_port_t" can be used to open any other uncommon service port including the http service. Is it?
Thanks for the information. That means the tag "-a -t http_port_t" can be used to open any other uncommon service port including the http service. Is it?
Re: Allowing Uncommon Ports on SELinux
Each service will have its own context but the principle is the same.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 19
- Joined: 2017/10/31 16:48:13
Re: Allowing Uncommon Ports on SELinux
by using the same principle but a different context.
"Username" T. - Always Preferred
Re: Allowing Uncommon Ports on SELinux
Hi TrevorH, CarlRestor
Thanks for the information. If you can provide a link to get further details pertain to this it is much appreciated.
Thanks
Thanks for the information. If you can provide a link to get further details pertain to this it is much appreciated.
Thanks
Re: Allowing Uncommon Ports on SELinux
https://www.rootusers.com/use-selinux-p ... ard-ports/
The first result of typing selinux allow unusual port into google.
This happens, sometimes one is unsure of good search terms, and when first learning, we don't always realize how easy it can be to find things, but it's always a good idea to try to find the answer yourself. (Then post it in the thread to help the next person searching.)
The first result of typing selinux allow unusual port into google.
This happens, sometimes one is unsure of good search terms, and when first learning, we don't always realize how easy it can be to find things, but it's always a good idea to try to find the answer yourself. (Then post it in the thread to help the next person searching.)
New users should check the FAQ and Read Me First pages
Re: Allowing Uncommon Ports on SELinux
Hi Scottro,
Thanks a lot for the information. I'll go through this link to check whether I get the exact information I need. At a glance I got the feeling ,this article is for changing common ports like 22 (ssh) to an uncommon port like 2222.
My requirement is to open a port like 4000 etc. which does not belong to any common service.
Thanks a lot for the information. I'll go through this link to check whether I get the exact information I need. At a glance I got the feeling ,this article is for changing common ports like 22 (ssh) to an uncommon port like 2222.
My requirement is to open a port like 4000 etc. which does not belong to any common service.