Firewall and port forwarding - Suse

This is a discussion on Firewall and port forwarding - Suse ; What am I doing wrong? -A PREROUTING -i eth0 -p tcp -m tcp --dport 9300 -j DNAT --to-destination 192.168.1.246:9300 -A POSTROUTING -o eth0 -j MASQUERADE Port 9300 is open but it does not forward to the other comp. WHY?...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Firewall and port forwarding

  1. Firewall and port forwarding

    What am I doing wrong?

    -A PREROUTING -i eth0 -p tcp -m tcp --dport 9300 -j DNAT
    --to-destination 192.168.1.246:9300
    -A POSTROUTING -o eth0 -j MASQUERADE

    Port 9300 is open but it does not forward to the other comp. WHY?

  2. Re: Firewall and port forwarding

    On Thu, 20 Mar 2008, Barney Gumble wrote:-

    >What am I doing wrong?
    >
    >-A PREROUTING -i eth0 -p tcp -m tcp --dport 9300 -j DNAT --to-
    >destination 192.168.1.246:9300
    >-A POSTROUTING -o eth0 -j MASQUERADE
    >
    >Port 9300 is open but it does not forward to the other comp. WHY?


    It's been a long while since I've used port forwarding on a Linux
    system, since it's all taken care of by my router. However, digging up
    an old backup file, I found this:

    iptables -t nat -A PREROUTING -d -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.0.4
    iptables -t nat -A POSTROUTING -o ippp0 -j MASQUERADE

    which was a small snippet used to forward traffic bound for port 80 from
    the ISDN interface on my firewall box to the web server system, and to
    perform masquerading on the returned packets.

    Looking at your rules and mine, there appears to be little real
    difference. The only difference is that your PREROUTING rule specifies
    the interface using -i whereas mine specified the IP address using -d .


    Regards,
    David Bolt

    --
    www.davjam.org/lifetype/ www.distributed.net: OGR@100Mnodes, RC5-72@15Mkeys
    SUSE 10.1 32bit | openSUSE 10.2 32bit | openSUSE 10.3 32bit | openSUSE 11.0a1
    SUSE 10.1 64bit | openSUSE 10.2 64bit | openSUSE 10.3 64bit
    RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC |RISC OS 3.11

+ Reply to Thread