Network Troublshooting > General Networking Support in Linux

IP masq and squid proxy.

<< < (3/3)

ashwin_ice:
:(  Um awfully sorry ricky... I just saw your reply to my posting which I hadn't realised that I'd pasted in someone else's Thread. I was just retracing the solution u'd given me and I saw my post and your reply to the same just now  :( . This makes a lot of sense ricky.. configuring ports I want directly routed to use the router and HTTP browsers to use Squid.  Thank you so much but I hope this is all that I have to do...

Firstly I need to flush all the earlier TRANSPARENT PROXY settings which I'd made with these commands u'd posted earlier in this thread:

iptables=/sbin/iptables

$iptables --flush -t nat

iptables --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADE
iptables --append FORWARD --in-interface eth0 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward  


Then


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

Then

iptables -A INPUT -p udp -i eth0 --dport 21 -j DROP
iptables -A INPUT -p tcp -i eth0 --dport 22 -j  DROP
iptables -A INPUT -p smtp -i eth0 dport 25 -j DROP
                               "
Now Ricky Why r we saying Drop and I guess the Forwarding has been done in the previous step Correct  :D ! Now like is this enough or Do I need to configure more...

Ricky:

--- Quote ---Now Ricky Why r we saying Drop and I guess the Forwarding has been done in the previous step Correct  ! Now like is this enough or Do I need to configure more...
--- End quote ---

You don't need to use Drop at all. I suggest you as you was saying to do..
Also i have understood your earlier requirements wrongly ie.. you said..  
--- Quote ---would allow my clients to directly use the box as a ROUTER not as a NAT ROUTER.  
--- End quote ---
well saying router and NAT router is same thing. .. but the table about redirecting has done every thing already..  if you need more then instead of dropping you can redirect that to 8080 port.. Also you don't need more masquradind.. only one line is required..

Navigation

[0] Message Index

[*] Previous page

Go to full version