LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-09-2004, 11:28 PM   #1
alxdotnet
Member
 
Registered: Feb 2004
Distribution: Mandrake 10.0 Community
Posts: 30

Rep: Reputation: 15
Restrict Network Access


Hey all! I am admin of a multi-user computer. I'd like to restrict access to internet (or LAN) to only certain trusted accounts. How can I do this. Running Mandrake 10.0 Community w/ 2.6.3 kernel.
 
Old 04-10-2004, 12:45 AM   #2
hazza
Member
 
Registered: Nov 2003
Location: Australia
Distribution: Mandrake, SUSE, Fedora
Posts: 122

Rep: Reputation: 15
Iptables has an owner match that you can use to place restrictions on your users access to the network.

$ /sbin/iptables -m owner -h
...

OWNER match v1.2.8 options:
[!] --uid-owner userid Match local uid
[!] --gid-owner groupid Match local gid
[!] --pid-owner processid Match local pid
[!] --sid-owner sessionid Match local sid
[!] --cmd-owner name Match local command name

Since Mandrake uses shorewall it might be helpful for you to take a look at http://www.shorewall.net/UserSets.html.

Could you post more information about what firewall configuration you are using?
 
Old 04-10-2004, 12:01 PM   #3
alxdotnet
Member
 
Registered: Feb 2004
Distribution: Mandrake 10.0 Community
Posts: 30

Original Poster
Rep: Reputation: 15
I have no firewall on that particular computer, which sits behind my NAT router, which does have firewalling capabilities. All I want to do is restrict one user account from using the network.
 
Old 04-10-2004, 10:05 PM   #4
hazza
Member
 
Registered: Nov 2003
Location: Australia
Distribution: Mandrake, SUSE, Fedora
Posts: 122

Rep: Reputation: 15
If you have no firewall on that computer to consider then you could easily add a rule to the OUTPUT chain using iptables without interfering with anything. Try something like:

# /sbin/iptables -I OUTPUT -j REJECT -m owner --uid-owner <restricteduser>
# /sbin/service iptables save
# /sbin/chkconfig iptables on

That would prevent <restricteduser> from accessing anything via the network.
 
  


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
Restrict X server access using /etc/security/access.conf anand_kt Linux - General 0 04-22-2005 08:40 AM
Restrict access to filesystem? sb73542 Linux - Security 2 07-30-2003 04:47 PM
Restrict access by IP waifurchin Linux - Security 3 02-02-2003 07:54 AM
How to restrict telnet access Lexx Linux - Security 7 02-27-2002 08:48 AM
Restrict directory access bdu Linux - Security 1 02-07-2002 12:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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