LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-12-2012, 05:13 AM   #1
Lewy1
LQ Newbie
 
Registered: Feb 2012
Posts: 9

Rep: Reputation: Disabled
Squid + Dansguardian Setup


I've searched around for a long time but could not find clear instructions that I could understand for the following scenario.
I have a router running tomato on an internal ip address 10.0.1.1, and a pogoplug running debian and nginx at 10.0.1.7. I would like to set up a content filter on the pogoplug using squid and dansguardian or (squidguard). I will need all web requests to the router to go through squid/dansguardian.
Can someone please provide the basic changes needed to be made in the squid and dansguardian conf files, and the changes made to tomatoto force all requests through squid/dansguardian.
Thank you very much.
 
Old 08-22-2012, 06:26 PM   #2
TheMadIndian
Member
 
Registered: Dec 2007
Distribution: Fedora Slackware CentOS slax RHEL
Posts: 117

Rep: Reputation: 23
Quote:
Originally Posted by Lewy1 View Post
I've searched around for a long time but could not find clear instructions that I could understand for the following scenario.
I have a router running tomato on an internal ip address 10.0.1.1, and a pogoplug running debian and nginx at 10.0.1.7. I would like to set up a content filter on the pogoplug using squid and dansguardian or (squidguard). I will need all web requests to the router to go through squid/dansguardian.
Can someone please provide the basic changes needed to be made in the squid and dansguardian conf files, and the changes made to tomatoto force all requests through squid/dansguardian.
Thank you very much.
have you seen this?
http://tomatousb.org/forum/t-305093

I can tell you how I did it with iptables, if you can figure out Tomato to redirect 80 443 traffic

I have dansguardian listening on 8080 and squid listening on 3128

I redirect 80 and 443 to 8080 using iptables, in dansguardian I've configured proxyport to 3128
 
Old 08-24-2012, 02:02 AM   #3
Lewy1
LQ Newbie
 
Registered: Feb 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TheMadIndian View Post
have you seen this?
http://tomatousb.org/forum/t-305093

I can tell you how I did it with iptables, if you can figure out Tomato to redirect 80 443 traffic

I have dansguardian listening on 8080 and squid listening on 3128

I redirect 80 and 443 to 8080 using iptables, in dansguardian I've configured proxyport to 3128
Thanks, I did see that at some point, but it is for installing dansguardian on the router itself. I'm not sure how to configure things when it's on a separate box, and although I think I have a pretty good idea of what needs to be done I don't know how to implement it.
 
Old 08-24-2012, 06:28 AM   #4
TheMadIndian
Member
 
Registered: Dec 2007
Distribution: Fedora Slackware CentOS slax RHEL
Posts: 117

Rep: Reputation: 23
Quote:
Originally Posted by Lewy1 View Post
Thanks, I did see that at some point, but it is for installing dansguardian on the router itself. I'm not sure how to configure things when it's on a separate box, and although I think I have a pretty good idea of what needs to be done I don't know how to implement it.
Does the router support dnat?
 
Old 08-24-2012, 06:30 AM   #5
TheMadIndian
Member
 
Registered: Dec 2007
Distribution: Fedora Slackware CentOS slax RHEL
Posts: 117

Rep: Reputation: 23
I just checked it does. I'll send you the syntax when I'm not on my phone
 
Old 08-24-2012, 08:27 AM   #6
TheMadIndian
Member
 
Registered: Dec 2007
Distribution: Fedora Slackware CentOS slax RHEL
Posts: 117

Rep: Reputation: 23
ok according to this article its nothing more than iptables http://tomatousb.org/tut:setup-multi...tic-public-ips

so on the router you need to redirect 80 traffic (443 doesn't allow man in the middle) to your server running squid and dansguardian based on your example above 10.0.1.7

I like to declare variables for iptables
Code:
ipt="/sbin/iptables"

LAN_IFACE="eth0" (you'll need to replace this with the appropriate internal interface name on the router)

$ipt -t nat -A PREROUTING -i $LAN_IFACE -p tcp -m iprange --src-range $localsrc --dport 80 -j DNAT --to 10.0.1.7:8080
you can replace $localsrc if it doesn't resolve, change it to the range you want to redirect for instance

Code:
$ipt -t nat -A PREROUTING -i $LAN_IFACE -p tcp -m iprange --src-range 10.0.1.2-10.0.1.250 --dport 80 -j DNAT --to 10.0.1.7:8080
this assumes you've configured dansguardian to listen on 8080
 
Old 08-27-2012, 02:33 PM   #7
Lewy1
LQ Newbie
 
Registered: Feb 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thank you very much for your help. Sorry it so long for me to reply, but I just saw your posts.
 
  


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
[SOLVED] Squid+DansGuardian not working properly. squid blocking sites that should be linuxlover.chaitanya Linux - Server 13 11-10-2014 10:34 AM
[SOLVED] Dansguardian+squid struggled_newbie Linux - Newbie 1 11-19-2010 07:06 AM
Squid, ClamAV, and Dansguardian Setup metallica1973 Linux - Server 8 06-02-2010 09:17 AM
How do you setup dansguardian/squid to redirect to main acceptance page? blkcamarozr28 Linux - Software 0 07-02-2007 01:57 PM
Dansguardian and Squid yeeha! Linux - Networking 4 08-21-2006 01:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:17 AM.

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