On my RHAS3 I have 2 NICs, one connected to internet with real IP
and the other connected to my local LAN.
With some gentle help from this group I have managed to set up the
required iptables rule
iptables -t nat -A POSTROUTING -s localNet/LocalMask -o eth0 -j SNAT
--to-source realIP_of_my_RH
on this server so that my RH now acts as a
gateway/nat/router for my local workstations reaching internet. I even
managed to configure a DHCP server for distributing local IP's.
I even managed issuing apropriate iptables command (listed below) so
that all the traffic of different real IP's would be forwarded
directly to seperate local IP's, allowing my local servers within NAT
to provide service to internet outside users, individually.
***************************************
ifconfig eth0:0 secondary_real_IP and_its_mask
iptables -t nat -A PREROUTING -d secondary_real_IP -j DNAT --to
local_IP
iptables -t nat -A POSTROUTING -s local_IP -j SNAT --to
secondary_real_IP
***************************************
I have also managed to install squid (2.5.STABLE9-20050321) and
configure it to act as a cache-server for the local clients.
What I want to do now is to configure my gateway to act as a
transparent-caching-proxy for the internal clients, so that no one
would have to modify their own web-browsers for proxy settings.
After reading, I have issued the command
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT
--to-port 3128
from the site
http://www.tldp.org/HOWTO/TransparentProxy.html but with
no success.
Thanks for any kind of help.
Regards.