?
Solved

Block IRC for some but not all of my users

Posted on 2003-03-16
6
Medium Priority
?
584 Views
Last Modified: 2010-03-17
Hi,

I want to prohibit some of my users to connect to IRC, however there are also users that I want to allow to connect to IRC, so just blocking 6667(irc) in iptables won't do what I want.

Anyone can help me or give me a direction how to do this?
0
Comment
Question by:Soc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 3

Expert Comment

by:Ustas
ID: 8148074
local users ? (ie shell users ?)
change permissions for /usr/bin/irc

Remote users?
Do they have a static IP ? WHat is your network ?
Try giving selective access using IPtables
I.e. default drop, and allow to selective ip addresses.

Or a different solutions would be to setup a vpn server
(PoPToP would be a good choice) and make your users connect to the vpn to access irc server via a private network. Thus you can allow access to IRC using iptables for vpn private network only. Add masquerading for the new vpn net also.
0
 
LVL 1

Expert Comment

by:Hartman
ID: 8148102
Soc,

What you can do if you have the ips of the people you want to have access is to create rules just for them and then after them deny all others. It is not pretty and if your IP are static it will work ok.

For example

iptables -A OUTPUT -j ACCEPT -p tcp -s $ip --dport 6667
iptables -A OUTPUT -j ACCEPT -p tcp -s $ip --dport 6667
iptables -A OUTPUT -j ACCEPT -p tcp -s $ip --dport 6667
iptables -A OUTPUT -j DROP -p tcp --dport 6667

if your box is the firewall/proxy then OUTPUT is the proper location, if you box is the irc server then put the rules in the INPUT

Hartman
0
 

Expert Comment

by:g1itch
ID: 8149682
if they are local users i know theres an option to filter certain ports to different computers, maybe get a router that does that?
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:Soc
ID: 8160546
With users I mean users logging in to my machine through SSH, so not just network users.

My users come from varying IP addresses (dynamic, work, etc.), so blocking on IP basis won't be possible.

I also don't want to block access to the IRC servers since there are also clients I want to allow to connect to IRC.

When I block access to the program 'irc', users just download a new client, or even worse some IRC bot. I could 'threath' them with policies and rules, but don't want to do that, since it won't help.
0
 
LVL 2

Accepted Solution

by:
NMi earned 200 total points
ID: 8180629
I think you should use iptables to tune your local IRC access rights according to your policy.

[man iptables]

   owner
       This module attempts to match various characteristics of the  packet  creator,  for locally-generated  packets.   It  is  only valid in the OUTPUT chain, and even this       some packets (such as ICMP ping responses) may  have  no  owner,  and  hence  never match.

       --uid-owner userid
              Matches if the packet was created by a process with the given effective user id.

       --gid-owner groupid
              Matches if the packet was created by a  process  with  the  given  effective group id.
0
 

Author Comment

by:Soc
ID: 8181982
Thanks mate, should have looked in the man before I posted, but thanks a lot :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question