LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-24-2021, 03:15 AM   #1
B612
LQ Newbie
 
Registered: Feb 2018
Posts: 25

Rep: Reputation: Disabled
Limit user possibilities on network


Hello,

We have a user for technical support purpose.
He has access to specific directories, but how can we limit the things he can do.

For example he can, in the same segment do
Code:
ssh root@some_server
Or telnet, FTP and else.

In fact we don't want any possibilities of going out of the server for this user.

Maybe the firewall is the right way to deal with this ?

Thanks a lot.

Last edited by B612; 02-24-2021 at 03:17 AM.
 
Old 02-24-2021, 03:22 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,295
Blog Entries: 3

Rep: Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719
If he has a unique account or is a member of a specific group, then you can use nftables to filter outgoing packets according to the UID or GID of the originating socket. See 'man nft' and https://wiki.nftables.org/. That can limit outgoing connections to specific addresses. Don't forget about allowing DNS and ICMP while tightening things down.

However, in general that is more of a staffing problem than a technical problem. If he cannot be trusted, then he should not be in the network. Or is there something more complex there?
 
Old 02-24-2021, 04:30 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
if he could log in as root - he can do anything without any restriction (on that host).
Probably you need a regular user account instead with special sudo rights.
 
Old 02-24-2021, 11:53 PM   #4
B612
LQ Newbie
 
Registered: Feb 2018
Posts: 25

Original Poster
Rep: Reputation: Disabled
Hello,


Thanks for your answers.

@Turbocapitalist.
He cannot be trusted simply because is an external technical support for our website, and when he works on the server with his specific user (wordpress) we don't seat beside him.
So all servers on the same segment are accessible.

@pan64
He hasn't the root credential

He just has to work on the server, and the wordpress user doesn't have any need to go on the network.
 
Old 02-27-2021, 04:39 AM   #5
Gad
Member
 
Registered: May 2013
Distribution: FreeBSD
Posts: 566

Rep: Reputation: 114Reputation: 114
Is it necessary for the user to have direct access to the server? Once Wordpress is setup the rest is usually managed through the admin panel via web browser / web interface. You should also be able to setup users and fine grain their access rights from the same panel.
 
1 members found this post helpful.
Old 02-27-2021, 07:54 AM   #6
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
Quote:
ssh root@some_server
This should be disabled by default. You should not allow this, period.

Quote:
He hasn't the root credential
If he is logging in as root, then he has to have root privilege.

Quote:
Or telnet, FTP and else
You should not allow telnet or ftp access. If you need ftp then look at sftp.

Quote:
In fact we don't want any possibilities of going out of the server for this user.
Then restrict the user access permissions.

Quote:
However, in general that is more of a staffing problem than a technical problem. If he cannot be trusted, then he should not be in the network.
To the OP, why don't you log everything that he does. Inspect the log after he has done something.
 
Old 02-28-2021, 03:31 PM   #7
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,342

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
A user should never be allowed to login as root via ssh. In fact, on most systems that is disabled by default.
The user should have his own account and only be able to login locally or ssh into that.

Then the sudoers file should be carefully configured to allow that specific user to do only those admin tasks you want him to do. It can be done with careful planning.

The sudo log then will log each command he runs and you will have the audit trail needed.
Additionally his .bash_history file will log what commands are run by his user and the default count there is, I think, 1000 entries, although that can be changed.

It is obvious that for his task there must be some level of trust, but the least possible access is the best for security purposes. Giving him root access via ssh is potentially an enormous security breach.
 
Old 02-28-2021, 07:43 PM   #8
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,726

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by Gad View Post
Is it necessary for the user to have direct access to the server? Once Wordpress is setup the rest is usually managed through the admin panel via web browser / web interface. You should also be able to setup users and fine grain their access rights from the same panel.
I agree. WP should be administered using the Wordpress admin panel. Disable that user’s ability to access the system any other way.
 
  


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 Limit suphp user memory limit? Rundi Linux - Server 2 05-14-2010 12:27 PM
svn user with very restricted possibilities? khaan Linux - Newbie 2 03-16-2010 01:55 PM
openBSD user count + 1 - questions about possibilities of security use rsciw *BSD 10 06-01-2009 01:28 AM
[Dual screen] Possibilities ? maxmaxmax Linux - Hardware 1 09-19-2002 12:00 PM
Oh the possibilities. gboutwel General 0 12-04-2001 09:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:45 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