[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: iptables nat forwarding



On Tuesday 18 September 2001 03:32 pm, Hereward Cooper wrote:
> Hi,
> Could someone please tell me why this command won't forward any www calls
> to 192.168.1.1 (firewall + gateway) to 192.168.1.2 (apache server).
>
> iptables -t nat -A PREROUTING -p TCP --dport 80 -j DNAT --to-destination
> 192.168.1.2:80
>
>
> What I can't figure is why that doesn't work, when the following command
> does work to forward all external ssh requests from the gateway, to the
> apache machine.
>
> iptables -t nat -A PREROUTING -p TCP -i ippp0 --dport 22 -j DNAT
> --to-destination 192.168.1.2:22

/sbin/iptables -A PREROUTING -t nat -p udp -d $PPP_LOCAL \
--dport 1234 -j DNAT --to 192.168.0.22:1234

Is what I use to forward UDP traffic on 1234 to my internal box in ip-up.d.

> Thanks,
>
> Hereward



Reply to: