IP tables, im stuck
this is the my iptables script for squid transparent proxying
---------------------------------------------------------------------------- iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128 ---------------------------------------------------------------------------- but this is the result of the script.. ---------------------------------------------------------------------------- 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 ---------------------------------------------------------------------------- my problem is the "source" and "destination" tables.. the values for this should be "anywhere" right?.. not 0.0.0.0/0.. any help guys.. thanks |
Hi,
0.0.0.0/0 is "anywhere." The slash zero on the end means "match the first zero bits." In otherwords, everything matches. |
im confused.. because i have a friend who has configured squid.. and when he showed mo his iptables, the source and destination is "anywhere"
im configuring transprent proxying.. but my linux box is behind a router.. so he said that i should make my linux box as gateway to enable transparent proxying.. but i only have one ethernet card.. but he said that it is still possible using iptables.. i also configure the iptables script for that but the result is 0.0.0.0/0.. |
Quote:
|
To perform transparent proxying, the computer in question MUST be in the routing chain between the source and the destination.
And yes, 0.0.0.0/0 is "anywhere." As a sample rule, on my box, iptables -L reveals: Code:
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh Code:
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 |
thanks for all the help!.. i have already configured transparent proxying..;) :) lets all study linux!!! :study:
|
All times are GMT -5. The time now is 11:53 AM. |