LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-23-2005, 09:34 AM   #1
karpo66
LQ Newbie
 
Registered: Jan 2005
Posts: 1

Rep: Reputation: 0
long lastin troubles with iptables & squid


Hi! i'm running public internet terminal and i use squid with squidguard to block unwanted urls.

squid and squidguard works fine, but i want use it transparently so anyone cant turn off proxy from browser settings...

using command for iptables;

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128

i have tryed to redirect all traffic from port 80 to 3128 but it still dont have any effect. Traffic seem be still going throught port 80

so question is: can i use "nat based iptable" for local connections ?


SPECS:
----------------------------------------------------------------------------------

i have compiled all necessary things to kernel;

Networking support
- Sysctl support

Networking Options
- Network packet filtering
- TCP/IP networking

Networking Options -> IP: Netfilter Configuration
- Connection tracking
- IP tables support

- Full NAT
- MASQUERADE target support
- NETMAP target support
- NAT of local connections
- REDIRECT target support

File Systems
- /proc filesystem support



using these setting in squid.conf;

http_port 3128
http_port 80
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on


iptables -nL -t nat

Chain PREROUTING (policy ACCEPT)
target prot opt source destination
REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 redir ports 3128

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
 
  


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
IM blocking with combination of IPtables & Squid shamza Linux - Security 1 09-29-2005 01:00 AM
troubles with iptables... wazilian Linux - Networking 4 03-22-2005 07:33 PM
iptables troubles ]SK[ Linux - Software 5 02-12-2005 08:52 AM
squid troubles xilace Linux - Networking 1 10-20-2004 12:45 PM
Iptables & squid issues sedulous Linux - Networking 1 10-05-2003 02:28 AM

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

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