Skip to contentSkip to conversation

iptable for single nic

DISCUSSION /dev/rob0 2 participants 2 messages Jul 25, 2005 – Jul 26, 2005 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

/dev/rob0

author
#1 lore raw
Quoted 5 lines · john decot

sorry it was the mistake in this mail. i have used redirect rules with --to-ports 3128 as

iptables -A PREROUTING -t nat -p tcp -m tcp -i eth0 -s $lan_network_ip -d 0/0 -j REDIRECT --to-ports 3128

Where's the "--dport 80"? I have yet to see one which is perfect. Looks like you're going to redirect all TCP traffic from $lan_network_ip to squid.

Quoted 1 line

but it seems not working again. is anything wrong with my transparent proxy configuration???

Offhand I'd guess so, but since I don't know your whole rule set I cannot say for sure. Post your iptables-save(8) output to the list. Also, look at "iptables -vt nat -nL" and note the packet counters. iptables rules are evaluated in order. If an earlier rule matches these packets, this rule you added won't be hit.

Quoted 1 line

any help..

Troubleshoot it yourself before you post again. Try
"telnet netfilter.org 80" from one of the clients and watch your squid logs and check the iptables packet counters. Every attempt to go out on port 80 should increment the counter by one, and should be logged in squid.

Signature · 2 lines
    mail to this address is discarded unless "/dev/rob0"
    or "not-spam" is in Subject: header
#2 lore raw

thanks for replying , i have solve my problem

by prerouting traffic of 80 port to 3128 then after i used nating rules. it gets work now.

thanks to all.
/dev/rob0 <[email protected]> wrote:

Quoted 5 lines · john decot

sorry it was the mistake in this mail. i have used redirect rules with --to-ports 3128 as

iptables -A PREROUTING -t nat -p tcp -m tcp -i eth0 -s $lan_network_ip -d 0/0 -j REDIRECT --to-ports 3128

Where's the "--dport 80"? I have yet to see one which is perfect. Looks like you're going to redirect all TCP traffic from $lan_network_ip to squid.

Quoted 2 lines

but it seems not working again. is anything wrong with my transparent proxy configuration???

Offhand I'd guess so, but since I don't know your whole rule set I cannot say for sure. Post your iptables-save(8) output to the list. Also, look at "iptables -vt nat -nL" and note the packet counters. iptables rules are evaluated in order. If an earlier rule matches these packets, this rule you added won't be hit.

Quoted 1 line

any help..

Troubleshoot it yourself before you post again. Try
"telnet netfilter.org 80" from one of the clients and watch your squid logs and check the iptables packet counters. Every attempt to go out on port 80 should increment the counter by one, and should be logged in squid.

Signature · 7 lines
mail to this address is discarded unless "/dev/rob0"
or "not-spam" is in Subject: header


		
---------------------------------
 Start your day with Yahoo! - make it your home page