iptables redirect
Derek Broughton
news at pointerstop.ca
Fri Dec 21 17:33:28 UTC 2007
Luca Ferrari wrote:
> Hi,
> I'd like to open a port on my firewall to redirect to a testing web server
> machine, thus I'm doing:
>
> $IPTABLES -t nat -I PREROUTING -i $EXT_INTF -p tcp -d $FIREWALL --dport
> 9999 -s 0/0 -j DNAT --to $SONY:80 -v
> $IPTABLES -I FORWARD -p tcp -i $EXT_INTF --dport 9999 -d $SONY -j
> ACCEPT
> $IPTABLES -I FORWARD -p tcp -i $EXT_INTF --dport 80 -d $SONY -j
> ACCEPT
>
> $SONY is my destination machine, and I'd like to have the connection
> opened from port 9999 on my firewall external interface to sony:80 port,
> but this is not working. If I try to connect I get connection refused.
> Any idea?
I'd strongly recommend issuing the same commands _without_ variables. Since
we don't know what any of them actually are, it's entirely possible the
commands don't do what you think they do...
--
derek
More information about the ubuntu-users
mailing list