LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-14-2015, 01:20 AM   #1
gibigibi
LQ Newbie
 
Registered: May 2015
Posts: 2

Rep: Reputation: Disabled
restrict specific port access only to root user


Hello everyone,

I want to restric a port (let's say port 9000) to be listenable only by root user. By default Linux does this for ports under 1024 but for ports above it I didn't find any method to do this. What are your suggestions ?

Thx
 
Old 05-14-2015, 01:52 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
root should start that app (and listening on port 9000) and nobody else will be able to listen on it.
 
Old 05-14-2015, 04:43 AM   #3
gibigibi
LQ Newbie
 
Registered: May 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
There might be no app running and listening. I want that port to be not listenable by other users when it is not in use.
 
Old 05-15-2015, 08:54 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
That's not really how Linux is designed; short of having a cron job or similar to check/kill procs on 9000 I think you're going to struggle.
There are plenty of ports under 1024 that are not actually used; any reason you can't just use one of them?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to restrict a specific user? johnsfine Linux - Security 1 05-29-2014 06:29 PM
How to deny root access to specific user's files haariseshu Red Hat 8 09-04-2009 07:36 AM
restrict a tcp port to only a specific program powah Linux - Security 3 04-17-2007 08:03 AM
Restrict access times for specific IP addresses? gjhicks Linux - Networking 11 11-02-2006 10:42 PM
To restrict a specific user simi_virgo Linux - Newbie 1 02-26-2005 12:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration