Essenz Rackmount Servers | APC Rack Cabinet Equipment


comp.unix.bsd.freebsd.misc

Subject: Re: ipfw, freebsd 4.6, natd redirected ports (NOT)

Ok Scott,
	I'll try it right now your way.. I had previously had the -redirect_port
in the /etc/rc.conf under natd_flags, but i took it out when i didn't
make a connection to my internal box, thus prompting me to try on the
command line.

Anyways... I'm rebooting the machien now.. we'll see if it works..

Thanks for the responce!


wsware wrote:
 >>0wn3d# natd -interface fxp0 -redirect_port tcp 192.168.0.2:80 80
 >>natd: Unable to bind divert socket.: Address already in use
 >
 >
 > natd is already running is the reason you get the Address already in
 > use.
 > You need to put the options in /etc/rc.conf natd_flags="-redirect_port
 > tcp 192.168.0.2:80 80"  or better yet point it to a config file. As
 > far as I know to change natd setting after boot you have to kill it a
 > restart it.
 >
 > Here is what I use:
 >
 > /etc/rc.conf
 > ------------
 > natd_enable="YES"
 > natd_flags="-f /etc/natd.conf"
 > natd_interface="fxp0"
 >
 >
 > /etc/natd.conf
 > --------------
 > use_sockets yes
 > same_ports yes
 > dynamic yes
 > unregistered_only yes
 > redirect_port tcp 192.168.1.5:9110 9110
 > redirect_port udp 192.168.1.5:9110 9110
 > redirect_port tcp 192.168.1.5:6073 6073
 > redirect_port udp 192.168.1.5:6073 6073
 > redirect_port tcp 192.168.1.5:47624 47624
 > redirect_port udp 192.168.1.5:47624 47624
 > redirect_port tcp 192.168.1.5:2302-2306 2302-2306
 > redirect_port udp 192.168.1.5:2302-2306 2302-2306
 > redirect_port tcp 192.168.1.6:2307-2311 2307-2311
 > redirect_port udp 192.168.1.6:2307-2311 2307-2311
 >
 >
 >
 > If you change the settings in /etc/natd.conf you will have to kill
 > natd and restart it like so:
 >
 > %killall natd
 > %natd -n fxp0 -f /etc/natd.conf
 >
 >
 > -Scott