Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-03-2010, 03:08 AM
|
#1
|
LQ Newbie
Registered: Feb 2010
Posts: 5
Rep:
|
Unable to block google chat in gmail using iptables
I've tried to block chatting from inside gmail account using iptables..but been unsuccessful in my Redhat Linux Box. I gave
service iptables stop
IPTABLES -A INPUT -s 209.85.231.189 -i eth0 -p tcp -j REJECT
IPTABLES -A OUTPUT -s 209.85.231.189 -i eth0 -p tcp -j REJECT
service iptables save
service iptables start
209.85.231.189 is the ip address for chatenabled.mail.google.com.
I tried giving the domain instead of the ip address. People were still able to chat via their gmail accounts. Did I do anything wrong or is there any other way of doing it.
Thanks & Regards,
Arun Vijay.V
|
|
|
02-03-2010, 03:12 AM
|
#2
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
When I checked that domain with "dig", it says the IP address is 208.69.36.132.
|
|
|
02-03-2010, 03:22 AM
|
#3
|
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
Quote:
Originally Posted by arun_1328
I've tried to block chatting from inside gmail account using iptables..but been unsuccessful in my Redhat Linux Box. I gave
service iptables stop
IPTABLES -A INPUT -s 209.85.231.189 -i eth0 -p tcp -j REJECT
IPTABLES -A OUTPUT -s 209.85.231.189 -i eth0 -p tcp -j REJECT
service iptables save
service iptables start
209.85.231.189 is the ip address for chatenabled.mail.google.com.
I tried giving the domain instead of the ip address. People were still able to chat via their gmail accounts. Did I do anything wrong or is there any other way of doing it.
|
If you're absolutely sure that blocking that subdomain will do the trick, then a better option might be to use Squid to deny access. An ACL for this might look like:
Code:
acl gchat dstdomain .chatenabled.mail.google.com
http_access deny gchat
Last edited by win32sux; 02-03-2010 at 03:24 AM.
|
|
|
02-03-2010, 09:16 AM
|
#4
|
LQ Guru
Registered: Apr 2005
Location: /dev/null
Posts: 5,818
|
I'm with win32sux on that one. I would definitely use squid to pull that off.
|
|
|
02-04-2010, 10:46 PM
|
#5
|
LQ Newbie
Registered: Feb 2010
Posts: 5
Original Poster
Rep:
|
Thanks guys,
Sorry for the delay in responding to your suggestions. Chat is still possible from inside gmail. I read from another thread in this forum that you cant block/filter a site if it uses "https" connection using squid. Is that true. If so is there any other option left for me because all gmail access here is through "https"
Thanks & Regards,
Arun Vijay.V
|
|
|
02-04-2010, 11:12 PM
|
#6
|
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
Quote:
Originally Posted by arun_1328
Chat is still possible from inside gmail. I read from another thread in this forum that you cant block/filter a site if it uses "https" connection using squid. Is that true. If so is there any other option left for me because all gmail access here is through "https"
|
Of course you can block a site if it uses HTTPS. The problem here is that if both services (email and chat) use an HTTPS connection to the same host, then your Squid won't be able to differentiate between email and chat traffic, as it'll all be encrypted. So basically, I'd say stick to your original plan (to block access to the .chatenabled.mail.google.com subdomain) and let us know whether it has the desired effect or not. Also, if you could post some access log data from Squid while the chat feature is activated that would help us suggest ACL tweaks.
Last edited by win32sux; 02-04-2010 at 11:19 PM.
|
|
|
02-04-2010, 11:19 PM
|
#7
|
LQ Newbie
Registered: Feb 2010
Posts: 5
Original Poster
Rep:
|
Thank you... I've tried your suggestion of denying access to the .chatenabled.mail.google.com in squid. It was only after that I posted the reply.
Regards,
Arun Vijay.V
|
|
|
02-04-2010, 11:20 PM
|
#8
|
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
Quote:
Originally Posted by arun_1328
Thank you... I've tried your suggestion of denying access to the .chatenabled.mail.google.com in squid. It was only after that I posted the reply.
|
Okay, then could you show us what the access log looks like during a session?
|
|
|
02-05-2010, 03:34 PM
|
#10
|
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
Quote:
Originally Posted by arun_1328
|
Well, I don't see anything there which could be used to single out the chat service. In fact, I'm not even seeing the .chatenabled.mail.google.com subdomain anywhere (which should show up as TCP_DENIED). Are you sure that chat was being used when these log entries were created? It would be nice to see the log starting from when the chat itself is enabled by the user.
Last edited by win32sux; 02-05-2010 at 03:36 PM.
|
|
|
02-09-2010, 09:07 PM
|
#11
|
LQ Newbie
Registered: Feb 2010
Posts: 5
Original Poster
Rep:
|
Thanks win32x,
Been a bit busy over the past couple of days.. Yes , the chat facility was being used while these log entries were created. I've been told that what ever data are service happens through a secure HTTPS connection is not logged. i mean a log entry is not generated. Is that true. This info too I came across from another thread. Thanks again for your patience.
Regards,
Arun Vijay.V
|
|
|
02-09-2010, 10:22 PM
|
#12
|
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
Quote:
Originally Posted by arun_1328
Thanks win32x,
Been a bit busy over the past couple of days.. Yes , the chat facility was being used while these log entries were created. I've been told that what ever data are service happens through a secure HTTPS connection is not logged. i mean a log entry is not generated. Is that true. This info too I came across from another thread. Thanks again for your patience.
|
Squid will log the start of SSL connections.
For example, this is what a line from my log looks like when I connect to LQ via Squid on localhost:
Code:
1265775171.019 100630 127.0.0.1 TCP_MISS/200 63488 CONNECT www.linuxquestions.org:443 - DIRECT/75.126.162.205 -
As you can see, the CONNECT method is being used, with host www.linuxquestions.org at TCP port 443.
After the SSL connection is initiated, you're toast - which is why you need to check the log file before chat is initiated. If that chatenabled.mail.google.com subdomain (or any other chat-specific one) is used for anything, it should show up in your log. I don't know how Google handles this, but if a connection to that subdomain is necessary in order to get the chat thing working, then blocking it should work. If it's not needed, and everything is happening through subdomains like mail.google.com, then it might not be possible to filter the chat feature without also affecting the webmail service.
Last edited by win32sux; 02-09-2010 at 10:26 PM.
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 03:19 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|