LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-22-2010, 05:13 PM   #1
erwincas
LQ Newbie
 
Registered: May 2006
Posts: 7

Rep: Reputation: 0
Users use DNS from the isp to bypass Squid


I'm using Fedora 10 as a proxy server using squid, but I recently noticed that some users use the IPS's Dns to bypass the proxy and surf the web freely. So my question is, is this a problem with Squid or perhaps I can solve the problem whit IPTables.


Thanks for the help.
 
Old 07-22-2010, 08:27 PM   #2
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
Blocking these servers and any others you can think of ought to go a long way Free Public DNS Server

Code:
Service provider: Google

8.8.8.8
8.8.4.4
Service provider: ScrubIt
Public dns server address:

67.138.54.100
207.225.209.66
Service provider:dnsadvantage
Dnsadvantage free dns server list:

156.154.70.1
156.154.71.1
Service provider:OpenDNS
OpenDNS free dns server list:

208.67.222.222
208.67.220.220
Service provider: vnsc-pri.sys.gtei.net
Public Name server IP address:

4.2.2.1
4.2.2.2
4.2.2.3
4.2.2.4
4.2.2.5
4.2.2.6
 
Old 07-22-2010, 08:48 PM   #3
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
you shouldn't need to block any dns, just convert your squid into a transparent proxy, they'll still be able to get around certain stuff from things like google cached pages or via a tunnel, but anything heading toward a normal web server will get sent to squid first.
 
Old 07-22-2010, 11:43 PM   #4
erwincas
LQ Newbie
 
Registered: May 2006
Posts: 7

Original Poster
Rep: Reputation: 0
I don't want to block any DNS, ok maybe this will explain more clearly my problem

in windows, I put this configuration.

Ip Address 192.168.0.10
Subnet Mask 255.255.255.0
Gateway 192.168.0.1

Preferred DNS Server (left in blank)
Alternate DNS Server (left in blank)

and in the browser I configure the proxy as follows

Address 192.168.0.1 Port 3128

Whit this configuration windows is behind the Squid.

BUT!!!!!

If the user add the DNS from my ISP

Ip Address 192.168.0.10
Subnet Mask 255.255.255.0
Gateway 192.168.0.1

Preferred DNS Server 216.230.147.x
Alternate DNS Server 216.230.128.x

windows surf the web like it were connected directly to the router and doesn't
matter if there is a Proxy server.

Thanks again for the help.
 
Old 07-23-2010, 12:37 AM   #5
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
Like I said switch your squid over to a transparent proxy. To do this you'll need to redirect any port 80 traffic to it typically via iptables dnat if you are using linux as the outbound router os. The nice thing about this is it doesn't require them to configure the proxy in their browser.

http://www.cyberciti.biz/tips/linux-...uid-howto.html
 
1 members found this post helpful.
Old 07-23-2010, 10:35 PM   #6
erwincas
LQ Newbie
 
Registered: May 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks for your replay. I will use your suggestion and post later if the issue were corrected.
 
Old 07-23-2010, 11:58 PM   #7
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Alternatively, you could disable IP forwarding on the router for the clients, thereby forcing them to use Squid to get outside the LAN. FWIW, a stopgap while you decide your best approach could be (on the router):
Code:
iptables -I FORWARD -p UDP -i $LAN_IFACE -o $WAN_IFACE --dport 53 -j REJECT
iptables -I FORWARD -p TCP -i $LAN_IFACE -o $WAN_IFACE --dport 53 -j REJECT
iptables -I FORWARD -p TCP -i $LAN_IFACE -o $WAN_IFACE --dport 80 -j REJECT
iptables -I FORWARD -p TCP -i $LAN_IFACE -o $WAN_IFACE --dport 443 -j REJECT
This prevents Web traffic (at least that which uses the standard ports) from being forwarded, which essentially means they'll be forced to use Squid for this sort of thing. I'd make sure outbound DNS queries aren't being used by the clients for anything else before blocking them, though.

Last edited by win32sux; 07-25-2010 at 06:42 PM. Reason: Added rules for HTTP/S.
 
  


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
Squid to configure with these, two isp through two router and each has pri & sec DNS rambca Linux - Newbie 6 09-04-2010 03:55 AM
Squid and Dansguardian in use, but users to bypass proxy on certain times of the day codenjanod Linux - Server 1 09-25-2009 11:47 AM
restrict users to bypass the squid proxy server rashid_47010 Linux - Server 2 08-05-2009 10:35 AM
how to authenticate external users but bypass prompt on local LAN users? taiwf Linux - Security 5 07-13-2005 09:01 AM
bypass isp dns cache BlueOrb Linux - Networking 1 08-30-2004 11:03 PM

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

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