Forwarding internal internet packets to internal webserver using iptables

Hi,

I need to redirect internal internet requests to a auth client site siting on the gateway. Currently users that are authenticated to access the internet have there mac address listed in the FORWARD chain. All other users need to be redirected to a internal site for authentication.

Can point me in the right direction

Thanks

Hi,

If I understand what you want it is called transparent proxying and can be achieved with something like the following:
$IPTABLES -t nat -A PREROUTING -i $INTERNAL_IFACE -p tcp --dport 80 -j REDIRECT --to-port 3128
or you can redirect to any other port you like (the above implies redirection to the same machine).
If you want to redirect on another ip then you have to do something like the following:
$IPTABLES -t nat -A PREROUTING -i $INTERNAL_IFACE -p tcp -d <original dest ip> -j DNAT --to <new dest ip>

Hope this helps