473,386 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

block user through firewall

sokoun
30
Hi all,

I want to allow or block a specific user to access the web site and go to the internet. what should i do?

could you give a sample code to block this user.

I want to use iptables as a firewall command.

thanks.
Sep 10 '07 #1
1 2349
Nepomuk
3,112 Expert 2GB
Hi all,

I want to allow or block a specific user to access the web site and go to the internet. what should i do?

could you give a sample code to block this user.

I want to use iptables as a firewall command.

thanks.
I guess, you could have a group of people which are allowed to access the internet. Then probably (not tested) you can set only those people to be allowed online with iptables --gid-owner option (consult man iptables).

I found this online:
Expand|Select|Wrap|Line Numbers
  1. iptables -I OUTPUT -o eth0 -m owner --gid-owner nonet -j REJECT
  2.  
("nonet" being the group of users, which are allowed to access the net.) Apparently it does the job.

However, I've not worked with iptables much, so if someone can give more detailed information...

Greetings,
Nepomuk
Sep 10 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Ann | last post by:
Hi I have a question regarding the SQL Server(SQL Server 7) port 1433. Some body is trying to hack into our Windows 2000 server through port 1433. Is there a way i can close this port? I tried...
3
by: Nurchi BECHED | last post by:
Hello, my dearest respected brother, All! Hey, guys, this is Nurchi again. I had a quick question: Can C# (I guess I should say .NET Framework) block internet access. I am sure the answer is...
4
by: Chris Tanger | last post by:
Context: C# System.Net.Sockets Socket created with constructor prarmeters Internetwork, Stream and TCP everything else is left at the default parameters and options except linger may be changed...
3
by: Omega | last post by:
Hi In serveral firewall softwares you can block network traffic quickly with one click, can I do the same in c# ? Thanks
10
by: Lespaul36 | last post by:
I need to write a program to block certain URLs when web browsing, but I have not been able to really find anything to help. I was hoping to have a service running in the back that can check...
24
by: Rob R. Ainscough | last post by:
VS 2005 I have: ClickOnce deployment User's that hate and or don't want to use an IE Client (don't blame them) I don't see how ASPX web pages are going to survive? With .NET 2.0 and clickonce...
5
by: abcd | last post by:
any ideas on how to block a network port from being used, or one that is currently in use? For example, say I want to block port 23 from being used. by used, I mean allowing connections to or...
0
by: ndskim | last post by:
Currently I have the Web Services Proxy code generated by the WSDL.Exe command line. My Web app consists of ASP.NET in VB 2005 version. Here is what I have in the sample code: ' Set Proxy...
5
by: MZ | last post by:
Hello! Is it possible to block the web page for specified IP? I mean one IP. I would like my page work fine for any other users (with different IP). Is it possible? Thank you Marcin from...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.