ipfw forwarding - BSD

This is a discussion on ipfw forwarding - BSD ; I don't understand how to simply create a forwarding from my local port 800 to a remote port (on a virtual machine) 80. I've read a lot of stuff but can't get it working... Do I need divert for this ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: ipfw forwarding

  1. ipfw forwarding

    I don't understand how to simply create a forwarding from my local
    port 800 to a remote port (on a virtual machine) 80.

    I've read a lot of stuff but can't get it working...
    Do I need divert for this simple task?


  2. Re: ipfw forwarding


    "andrea" wrote in message
    news:1193566717.188961.51760@v3g2000hsg.googlegrou ps.com...
    >I don't understand how to simply create a forwarding from my local
    > port 800 to a remote port (on a virtual machine) 80.
    >
    > I've read a lot of stuff but can't get it working...
    > Do I need divert for this simple task?
    >

    You will need to add something like this to your setup:

    In your /etc/rc.conf add a line like this:

    natd_enable="YES"
    natd_interface="rl0"
    natd_flags="-f /etc/natd.conf"

    Then create a file called /etc/natd.conf and put some lines in it like this:

    dynamic
    redirect_port tcp xxx.xxx.xxx.xxx:800 80

    where xxx.xxx.xxx.xxx = the IP address of the remote machine. Please note
    that I hope I got the order of the port (800 80) in the correct order. I
    don't redirect to different ports, mine reads (80 80) so it can't be wrong
    on mine. If your's doesn't work you might try reversing the order.

    And of course I should enter the obligitory advice:

    man natd



+ Reply to Thread