* not solve yet!!!
@ 2005-07-25 6:07 john decot
2005-07-25 6:11 ` Anthony Sadler
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: john decot @ 2005-07-25 6:07 UTC (permalink / raw)
To: netfilter
Hello all,
i am facing a problem in iptables as follows:
i have single nic which ip is eth0= x.x.x.x(public_ip)
alias is eth0:1=y.y.y.y( private_ip)
the proxy works when ip of server and port 3128 at lan connection is
configured at client side(windows os).
But doesn't work without that whenever i flow traffic to proxy server,
again i have used ip tables as:
iptables -A PREROUTING -t nat -p tcp --dport 80 -i eth0 -j REDIRECT --to-port 3128
with above it doesn't work then i tried following
iptables -A PREROUTING -t nat -p tcp --dport 80 -i eth0 -j DNAT
$public_ip or $private_ip:3128
again the same result.
client pc and server is connect at same switch. and clients have
private ip where as server has public as well as private ip.
any help will be appreciated.
thanks in advance.
john
---------------------------------
Start your day with Yahoo! - make it your home page
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: not solve yet!!!
2005-07-25 6:07 not solve yet!!! john decot
@ 2005-07-25 6:11 ` Anthony Sadler
2005-07-26 16:50 ` Sergio Basurto Juarez
2005-07-27 7:53 ` Jörg Harmuth
2 siblings, 0 replies; 5+ messages in thread
From: Anthony Sadler @ 2005-07-25 6:11 UTC (permalink / raw)
To: 'john decot', netfilter
John:
This is the rule I use on our servers:
"iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT
--to-port 3128"
The only difference I can see is in the order... I don't know if that
matters.
Hope that helps!
Anthony Sadler
Far Edge Technology
w: (02) 8425 1400
-----Original Message-----
From: netfilter-bounces@lists.netfilter.org
[mailto:netfilter-bounces@lists.netfilter.org] On Behalf Of john decot
Sent: Monday, 25 July 2005 4:08 PM
To: netfilter@lists.netfilter.org
Subject: not solve yet!!!
Hello all,
i am facing a problem in iptables as follows:
i have single nic which ip is eth0= x.x.x.x(public_ip)
alias is eth0:1=y.y.y.y( private_ip) the proxy works when ip of server
and port 3128 at lan connection is configured at client side(windows os).
But doesn't work without that whenever i flow traffic to proxy server, again
i have used ip tables as:
iptables -A PREROUTING -t nat -p tcp --dport 80 -i eth0 -j REDIRECT
--to-port 3128
with above it doesn't work then i tried following iptables -A PREROUTING -t
nat -p tcp --dport 80 -i eth0 -j DNAT $public_ip or $private_ip:3128
again the same result.
client pc and server is connect at same switch. and clients have private ip
where as server has public as well as private ip.
any help will be appreciated.
thanks in advance.
john
---------------------------------
Start your day with Yahoo! - make it your home page
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: not solve yet!!!
2005-07-25 6:07 not solve yet!!! john decot
2005-07-25 6:11 ` Anthony Sadler
@ 2005-07-26 16:50 ` Sergio Basurto Juarez
2005-07-27 7:53 ` Jörg Harmuth
2 siblings, 0 replies; 5+ messages in thread
From: Sergio Basurto Juarez @ 2005-07-26 16:50 UTC (permalink / raw)
To: netfilter
--- john decot <johndecot@yahoo.com> wrote:
> Hello all,
> i am facing a problem in iptables as follows:
> i have single nic which ip is eth0=
> x.x.x.x(public_ip)
> alias is eth0:1=y.y.y.y( private_ip)
> the proxy works when ip of server and port 3128 at
> lan connection is
> configured at client side(windows os).
> But doesn't work without that whenever i flow
> traffic to proxy server,
> again i have used ip tables as:
>
> iptables -A PREROUTING -t nat -p tcp --dport 80 -i
> eth0 -j REDIRECT --to-port 3128
>
> with above it doesn't work then i tried following
> iptables -A PREROUTING -t nat -p tcp --dport 80 -i
> eth0 -j DNAT
> $public_ip or $private_ip:3128
>
> again the same result.
> client pc and server is connect at same switch. and
> clients have
> private ip where as server has public as well as
> private ip.
> any help will be appreciated.
>
> thanks in advance.
> john
Did you configured your proxy in order to act as a
transparen proxy I mean for example in squid is:
* httpd_accel_host virtual
* httpd_accel_port 80
* httpd_accel_with_proxy on
* httpd_accel_uses_host_header on
and it should work. I suppose you are listenning on
eth0 for incomming requests.
I hope this help.
Regards
--
Sergio Basurto J.
If I have seen further it is by standing on the
shoulders of giants. (Isaac Newton)
--
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: not solve yet!!!
[not found] <200507261217.j6QCHbEN024479@linux01.gwdg.de>
@ 2005-07-27 6:27 ` Jan Engelhardt
0 siblings, 0 replies; 5+ messages in thread
From: Jan Engelhardt @ 2005-07-27 6:27 UTC (permalink / raw)
To: Anthony Sadler; +Cc: netfilter
>This is the rule I use on our servers:
>
>"iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT
>--to-port 3128"
>
>The only difference I can see is in the order... I don't know if that
>matters.
Order is a little more important than on most posixy apps. You can't, for
example, specify --dport without giving -p tcp beforehand.
Jan Engelhardt
--
| Alphagate Systems, http://alphagate.hopto.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: not solve yet!!!
2005-07-25 6:07 not solve yet!!! john decot
2005-07-25 6:11 ` Anthony Sadler
2005-07-26 16:50 ` Sergio Basurto Juarez
@ 2005-07-27 7:53 ` Jörg Harmuth
2 siblings, 0 replies; 5+ messages in thread
From: Jörg Harmuth @ 2005-07-27 7:53 UTC (permalink / raw)
To: netfilter
john decot schrieb:
> Hello all,
> i am facing a problem in iptables as follows:
> i have single nic which ip is eth0= x.x.x.x(public_ip)
> alias is eth0:1=y.y.y.y( private_ip)
> the proxy works when ip of server and port 3128 at lan connection is
> configured at client side(windows os).
> But doesn't work without that whenever i flow traffic to proxy server,
> again i have used ip tables as:
>
> iptables -A PREROUTING -t nat -p tcp --dport 80 -i eth0 -j REDIRECT --to-port 3128
>
> with above it doesn't work then i tried following
> iptables -A PREROUTING -t nat -p tcp --dport 80 -i eth0 -j DNAT
> $public_ip or $private_ip:3128
>
> again the same result.
First configure your proxy to act transparently as Sergio pointed out.
Make sure the proxy is listening on the correct IP(s).
Did you check if your REDIRECT rule is hit (iptables -t nat -nvxL) ? If
the counters increase with each connection attempt, the rule is ok and
the reason is probably the proxy configuration.
If your rule is not hit, try if omitting "-i eth0" changes something.
Possibly there are some more low hanging fruits. Does the clients
default gateway point to your proxy server ? Are there any other rules,
that make connections impossible ? Does the proxy server-name resolve to
your clients ? Did you tcpdump the traffic to see, if packets make it to
the proxy and if so, what is in the conntrack table ? What is your
complete ruleset (either the output of iptables-save or iptables -t
$TABLE_NAME -nvxL) ?
Just some thoughts ;)
HTH and have a nice time,
Joerg
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-07-27 7:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-25 6:07 not solve yet!!! john decot
2005-07-25 6:11 ` Anthony Sadler
2005-07-26 16:50 ` Sergio Basurto Juarez
2005-07-27 7:53 ` Jörg Harmuth
[not found] <200507261217.j6QCHbEN024479@linux01.gwdg.de>
2005-07-27 6:27 ` Jan Engelhardt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox