On Thu, 2003-01-16 at 01:39, Gary Stainburn wrote:
> Could someone please provide me with the two commands I'd need to run
> (presumably the second would look something like:
> 
> iptables -A PREROUTING -t nat -d 10.1.0.34:80 -j DNAT --to 192.168.1.2

On Linux 2.4, you'd do this:

LOCAL_IP=10.1.0.34
LOCAL_PORT=80
REMOTE_IP=192.168.1.2

$IPTABLES -A PREROUTING -t nat -p tcp \
        -d "$LOCAL_IP" --dport "$LOCAL_PORT" \
        -j DNAT \
        --to-destination "$REMOTE_IP"
$IPTABLES -A POSTROUTING -t nat \
        -s $REMOTE_IP -j SNAT --to-source $LOCAL_IP


No need to frustrate yourself building scripts from scratch, you can do
this sort of thing very easily using some of the scripts here:
http://www.dragonsdawn.net/~gordon/firewalls/




-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to