On 9/12/06, Gabriel Briones <[EMAIL PROTECTED]> wrote:
Technically, you can achieve this using IPTables, you can only allow some hosts to access squid port on NIC3 then allow and NAT some hosts as NIC2's IP using NIC4's IP as the gateway. See example below

for squid:
iptables -A INPUT -s <HOST-OR-IP>/32 -i NIC3 -p tcp --dport <SQUID-PORT> -j ACCEPT

for NAT:
iptables -A FORWARD -s <ANOTHER-HOST-OR-IP>/32 -i NIC4 -j ACCEPT
iptables -t nat -A POSTROUTING -o NIC2 -s <ANOTHER-HOST-OR-IP>/32 -j SNAT --to <NIC2's IP>


you can also use iprange match option if you wish to use ranges

Thanks Sir Jon! How will I know that NIC3 (the one sharing the internet with squid proxy) gets its internet connection from NIC1 (or internet connection 1)?

What if ishare ko na lang both connection with NAT? puede din ba?


--
David Tacasa Asuncion, Jr.
website keeper, forever linux newbie, BUM extraordinaire

Linux User # 406430
http://counter.li.org/

GPG: 0A024BC0

_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to