Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Nov 2002 14:23:49 -0500 (EST)
From:      "Mike Berning" <berninme@muohio.edu>
To:        <freebsd-questions@freebsd.org>
Subject:   RE: NATD HELP
Message-ID:  <2388.24.27.164.225.1036697029.squirrel@webmail.muohio.edu>

next in thread | raw e-mail | index | archive | help
If you want to add rules to NATD you have to completely kill it or send it
the -HUP signal, and then restart it with the rules you want. The easiest
way to add rules to your NATD configuration is to use the natd_flags=""
part of your rc.conf file. To do this create a file in your /etc directory
called natd.conf. Use your text editor to add your port redirects and
address redirects to natd.conf, here is an example of what you would put
in a natd.conf

-redirect_port 192.168.0.2:80 80
-redirect_port 192.168.0.2:23 23

and continue on with the rest of your rules, save the file.

Now in your rc.conf file check to make sure that

gateway_enably="YES"
natd_enable="YES"
natd_interface="dc0" dc0 should be your interface to the internet
natd_flags="-config /etc/natd.conf" and any other flags you want,
seperated by a space

and that's it. Now when you start your machine this is the command it will
execute to start natd

natd -config /etc/natd.conf -interface dc0

this will load all the rules that you put into your natd.conf file so you
can easily add and subtract rules without changing your rc.conf. Add rules
into the natd.conf file just as you would at the command line. Hope this
helps, if you have any questions let me know.

ps make sure you recompiled your kernel with the options specified in the
handbook, and to restart natd do a #killall -HUP natd

Mike
berninme@muohio.edu

alvaro said:
>Im trying to set up natd in my FreeBSD BOX, I have read the NAT
>portion of the hand book but I still need some help.
>this is my environment
>10.10.1.2 (internal ip address of my wkstation)
>200.37.53.22 (this the natd box external  IP address)
>10.10.1.1 (internal address of the natd box, is the default gw of the
>wstation))
>When I run this command
>natd -redirect_address 10.10.1.2 200.37.53.22
>I get this message
>natd: aliasing address not given.Do I have to make



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2388.24.27.164.225.1036697029.squirrel>