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 10-12-2007, 05:22 PM   #1
kc8khl
LQ Newbie
 
Registered: May 2004
Location: Columbus, Ohio
Distribution: Gentoo, Ubuntu
Posts: 5

Rep: Reputation: 0
Transparent Proxy on second machine (iptables problem)


Hi,

I'm trying to set up a transparent proxy on a machine behind my firewall. I followed the instructions given here: http://www.faqs.org/docs/Linux-mini/...tProxy.html#s7 (the first method) but using lynx on a machine in the local net I can't get out.

I know the squid box is working fine, before and after I modify the firewall rules I can connect to squid if I specify the proxy in the client. However, if I don't specify a proxy, lynx (checked links too) just hangs on loading the page.

Here is the relevant portion of my firewall config script:

IPTABLES=/usr/sbin/iptables
EXTIF="eth0"
INTIF="eth1"
SQUIDIP="192.168.0.2"
INTNET="192.168.0.0/24"
INTIP="192.168.0.1"

$IPTABLES -t nat -A PREROUTING -i $INTIF -s \! $SQUIDIP -p tcp -d $UNIVERSE --dport 80 -j DNAT --to-destination $SQUIDIP:8080

$IPTABLES -t nat -A POSTROUTING -o $INTIF -s $INTNET -d $SQUIDIP -j SNAT --to $SQUIDIP

iptables -A FORWARD -s $INTNET -d $SQUIDIP -i $INTIF -o $INTIF -p tcp --dport 8080 -j ACCEPT

I echoed both of these lines and they look ok to me. I run them and don't get any errors.

To recap the observed behavior:
Before I execute the lines above
- links www.google.com (works fine)
- links www.google.com (manually specify proxy, works fine)
After I execute the lines above
- links www.google.com (does not work)
- links www.google.com (manually specify proxy, works fine)

I need to get that third case working. Any suggestions?

Thanks,

Mark
 
Old 10-13-2007, 12:03 AM   #2
kc8khl
LQ Newbie
 
Registered: May 2004
Location: Columbus, Ohio
Distribution: Gentoo, Ubuntu
Posts: 5

Original Poster
Rep: Reputation: 0
From firewall to proxy works as well.

I just thought to check that I can get from the firewall to the proxy. That works fine too, the firewall machine can connect to port 8080 on the proxy. So I'm still stuck.

Mark
 
  


Reply

Tags
iptables, proxy, transparent



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
IPTABLES, SQUID, DANSGUARDIAN and Transparent Proxy metallica1973 Linux - Networking 18 09-03-2007 07:17 PM
Transparent proxy on single machine SadPenguin Linux - Networking 3 01-30-2007 03:11 AM
Configuring a transparent proxy on a client machine ONLY instead of a server machine. clinux_rulz Linux - Networking 1 05-31-2006 02:53 AM
Iptables+transparent Proxy seitan Linux - Networking 11 12-13-2004 08:42 PM
transparent proxy on a single machine kscott121 Linux - Networking 2 06-27-2004 08:37 PM

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

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