LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-30-2008, 12:25 AM   #1
sanjee
Member
 
Registered: Jul 2008
Posts: 129

Rep: Reputation: 15
Arrow Blocking All messangers in LINUX


I have tried with every kind of possibilities , those found from Internet regarding to block Messangers . I put IPTABLES for blocking different ports . But somehow unable to block gtalk etc even gmail / msn site is blocked through SQUID .
 
Old 07-30-2008, 12:40 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Iptables can help you blocking messengers if you know what ports they use. You can give a look at this thread where I was having same problems maintaining squid.

http://www.linuxquestions.org/questi...-squid-651468/
 
Old 07-30-2008, 01:58 AM   #3
sanjee
Member
 
Registered: Jul 2008
Posts: 129

Original Poster
Rep: Reputation: 15
Thanks..linuxlover.chaitanya; But I have tried with so many ports...sometimes some messangers are blocking and some messangers are missing. It will be very helpfull if you please, give me some hints regarding the iptables chain ......which port for gtalk..in which chain [INPUT/OUTPUT/FORWARD].
 
Old 07-30-2008, 02:41 AM   #4
sanjee
Member
 
Registered: Jul 2008
Posts: 129

Original Poster
Rep: Reputation: 15
Dear Everyone......any suggestion.
 
Old 07-30-2008, 03:40 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
For gtalk either blocking 5222 port should work. But I have done this for Pidgin is the client most of the people use here. You may want to block 5050 for yahoo.
 
Old 07-30-2008, 03:41 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
You should block INPUT and put --sport 5222 for gtalk
 
Old 07-30-2008, 04:00 AM   #7
v00d00101
Member
 
Registered: Jun 2003
Location: UK
Distribution: Devuan Beowulf
Posts: 514
Blog Entries: 1

Rep: Reputation: 37
The only problem is that some messengers now have the option of using http for sending messages.

So you would need to block standard internet access as well, which may or may not go down well.
 
Old 07-30-2008, 08:39 AM   #8
sanjee
Member
 
Registered: Jul 2008
Posts: 129

Original Poster
Rep: Reputation: 15
I have tried with all combinations to block gtalk , but its still not solved.

-A INPUT -p udp -m udp --sport 5222:5333 -j DROP
-A OUTPUT -p udp -m udp --sport 5222:5333 -j DROP
-A FORWARD -p udp -m udp --sport 5222:5333 -j DROP
-A INPUT -p udp -m udp --dport 5222:5333 -j DROP
-A OUTPUT -p udp -m udp --dport 5222:5333 -j DROP
-A FORWARD -p udp -m udp --dport 5222:5333 -j DROP
-A INPUT -p tcp -m tcp --sport 5222:5333 -j DROP
-A OUTPUT -p tcp -m tcp --sport 5222:5333 -j DROP
-A FORWARD -p tcp -m tcp --sport 5222:5333 -j DROP
-A INPUT -p tcp -m tcp --dport 5222:5333 -j DROP
-A OUTPUT -p tcp -m tcp --dport 5222:5333 -j DROP
-A FORWARD -p tcp -m tcp --dport 5222:5333 -j DROP
Is there any other solution that not forward gtalk packet.
 
Old 07-30-2008, 10:20 PM   #9
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
If you are using transparent squid you may want to write it in nat table. But as said, the messengers are becoming intelligent and using the standard http pot 80. This might not work if gtalk is using port 80.
 
Old 07-30-2008, 11:37 PM   #10
sanjee
Member
 
Registered: Jul 2008
Posts: 129

Original Poster
Rep: Reputation: 15
I configured my squid simply....internal network allowed & others denied through acl. I had tried with other acl also, regarding to block messangers by putting port number and etc.....not done. Then I put port number in IPTABLES as above....not done. But yah....one thing u saying "nat table". I m thinking also . But what would be the format . Because I can't block port 80...its harmful for web trafic and I have to pass ftp & pop packet also to access external remote mail / FTP server login.Is there any iptable NAT chain format that can be used ,,,like----port 80 allowd except messangers.
But problem is that messangers are so clever that pass through port 80.So, what would be the solution.
 
Old 07-31-2008, 05:45 AM   #11
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
You can try to block source port 5222 and 5050 in filter table for all the chains. This might just help you. i am not sure but I have blocked the messenger traffic with this iptable rule.
 
  


Reply

Tags
gtalk



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
USB blocking in linux sachinm Linux - Software 2 07-03-2008 07:21 PM
Instant Messangers SLIM_SuSse_UsEr Linux - General 6 09-26-2007 09:40 PM
Linux Firewall + website blocking hallows1 Linux - Security 5 03-25-2007 11:50 PM
Best Instant Messangers? f34r7h1s Linux - Software 6 05-02-2006 09:45 AM
Is linux blocking ports? kryptobs2000 Linux - Networking 1 12-16-2005 02:17 PM

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

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