LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-16-2012, 10:10 AM   #1
Mikro
Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 40

Rep: Reputation: 17
how can I block network access to a user without iptables owner module?


Hi, i'm using slackware ~13, with iptables v1.4.7 and I thought the owner module was built in the kernel, but it is not (is now already deprecated? does that mean the ! in the manual?). I want to prevent internet access for a user, or at least, some apps I will be running under that account. How can this be done? thanks in advance!

Dån
 
Old 08-17-2012, 05:21 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Mikro View Post
is now already deprecated?
Not that I'm aware of. Should be /lib/modules/${VERSION}/kernel/net/netfilter/*owner*.ko.


Quote:
Originally Posted by Mikro View Post
does that mean the ! in the manual?
No, that's for negation.


Quote:
Originally Posted by Mikro View Post
I want to prevent internet access for a user, or at least, some apps I will be running under that account.
Since you haven't given any reason why you would be doing that I'll just list possibilities regardless of invasiveness, feasibility, etc, etc:
- block outbound --syn and --state NEW connections if specific ports are used,
- LD_PRELOAD a wrapper that intercepts network-related system calls,
- run the application inside a network-restricted LXC or VM,
- use a MAC that can govern network access like GRSecurity.
 
Old 08-18-2012, 08:31 AM   #3
Mikro
Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 40

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by unSpawn View Post
Not that I'm aware of. Should be /lib/modules/${VERSION}/kernel/net/netfilter/*owner*.ko.
I had compiled my kernel without the netfilter owner module, didn't see NETFILTER_ADVANCED had to be selected for the additional filters to be shown in xconfig (and compiled it a year ago, when I didn't need iptables, also)

Quote:
Originally Posted by unSpawn View Post
No, that's for negation.
You are right, at first sight I thought the options were negated like "--option ! <param>" instead of "! --option <param>" and the notation in the manual confused me.

Quote:
Originally Posted by unSpawn View Post
Since you haven't given any reason why you would be doing that I'll just list possibilities regardless of invasiveness, feasibility, etc, etc:
- block outbound --syn and --state NEW connections if specific ports are used,
I want to allow network access for the rest of the users in the same ports

Quote:
Originally Posted by unSpawn View Post
- LD_PRELOAD a wrapper that intercepts network-related system calls,
That would work, I didn't knew that

Quote:
Originally Posted by unSpawn View Post
- run the application inside a network-restricted LXC or VM,
That would also work, but I prefer not to use a VM

Quote:
Originally Posted by unSpawn View Post
- use a MAC that can govern network access like GRSecurity.
Very interesting, I will take a look at that.


I am compiling the kernel again, this time with the filters (I had searched the kernel config for the netfilter options but couldn't see them, thought they were deprecated... dumb me). I will try iptables again, or go with one of the alternatives you gave. Thanks a lot for your help!

Dån
 
  


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
[SOLVED] Block Web Access With Iptables mossy464 Linux - Networking 26 04-26-2010 06:40 PM
block access from iptables and / or ftp configuration ?! ytd Linux - Security 6 11-03-2009 09:10 AM
IPTables owner module questions Coolmax Linux - Networking 1 07-12-2009 11:28 PM
by using iptables block mac address to restric user to access internet Farrukh Fida Linux - Networking 3 10-09-2006 07:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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