LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-16-2009, 03:59 PM   #1
pworcester
LQ Newbie
 
Registered: Apr 2006
Posts: 7

Rep: Reputation: 0
NAT/Squid/Dansquradian -HELP!


All

I'm running a multi-home linux server that uses nat to pass my workstations to the web.

eth0 - 192.168.1.102 - public side
eht1 - 10.10.11.1 - private side

I've installed squid 3.0 and dansguardian 2.10 and nothing is filtering or being recorded in either the squid access.log or the dansguardian access.log

Here is my iptables config:

/sbin/modprobe iptable_nat
/usr/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
/usr/sbin/iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
/usr/sbin/iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
/usr/sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080

Thanks!
 
Old 04-16-2009, 04:09 PM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Don't you want your redirect from eth1?

Also, have you allowed forwarding (echo "1" > /proc/sys/net/ipv4/ip_forward"

What happens if you connect directly to 8080 rather than 80?
 
Old 04-16-2009, 05:13 PM   #3
pworcester
LQ Newbie
 
Registered: Apr 2006
Posts: 7

Original Poster
Rep: Reputation: 0
That worked!

ip_forward was already set as I was NATing successfully. I changed the eth0 to eth1 and it started writing to the logs, both squid and dansguardian. I was then getting ACCESS DENIED from squid. I hammered throught the squid.conf and allowed access and now it's working!

Thanks!!
 
  


Reply

Tags
dansguardian, nat, network, squid



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
No NAT from squid zmunawar1 Linux - Server 1 07-21-2008 12:48 AM
squid proxy confiuration+NAT deepak rawat Linux - Networking 3 04-13-2006 04:07 AM
Squid behind a NAT/FW colonyofcrumbs Linux - Networking 3 05-17-2005 10:18 PM
Squid with NAT azfar Linux - Networking 5 11-24-2004 08:54 PM
problem about NAT and squid Warchief Linux - Networking 3 07-21-2003 06:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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