Port Forwarding

Posted:
in Genius Bar edited January 2014
I recently setup a gnu/linux box which I intend to act mostly as my ftp and web servers. I have a little LAN setup, and natd works and all that jazz. All comps in my network can hit the internet fine, and the outside can hit us back. BUT, as I said, I want the GNU/Linux box to be my ftp and www servers. So I want to setup port forwarding. After a lot of googling it seems the options are ssh and natd. ssh seems kind of dirty, and using it seems to require that I maintain an interactive ssh session between my router box (macosx) and the linux box. for the life of me, I can't get the natd way working.



googling tells me I should add a line like this to my natd.conf (in /etc):

redirect_port tcp 192.168.15.32:80 80



where 192.168.15.32 is my linux box, 80 is the port number for www, and tcp (i'm pretty sure) is the protocol that www uses. i 'sudo killall natd' (and make sure that natd is dead), and then restart it like this 'sudo natd -f /etc/natd.conf'. natd doesn't choke on my redirect_port line, so the syntax is right, but trying to hit the site doesn't go to the linux box, it goes to the macosx box.



anyone know what i'm doing wrong? or know another way to redirect ftp and www to the linux box?

Comments

  • Reply 1 of 3
    thuh freakthuh freak Posts: 2,664member
    nevermind. it seems that it was workign all along. but natd doesn't switch local requests to the linux box unless i use 192.168.15.32.



    anyone know how i can redirect internal requests on those ports to the linux box?
  • Reply 2 of 3
    eugeneeugene Posts: 8,254member
    Weird, it shouldn't work unless you've also told ipfw about natd...



    On the linux box you should be able to use a hosts file to point a domain to an internal IP.
  • Reply 3 of 3
    thuh freakthuh freak Posts: 2,664member
    Quote:

    Originally posted by Eugene

    Weird, it shouldn't work unless you've also told ipfw about natd...



    On the linux box you should be able to use a hosts file to point a domain to an internal IP.




    i do have ipfw setup with a few rules. nothing particular about port forwarding though.
Sign In or Register to comment.