 |
Setting up NATd
added 8.2.1998 -- written by Perlsta
|
Article Description: Using NATd will allow multiple computers or devices to share the same IP address. Great for cable modems and such.
These instructions will help you configure NATd on FreeBSD with the firewall implemented.
NATd will NOT work unless you have a properly configured firewall, so read the firewall tutorial first if you have not already done so.
Note that it is almost suicidal to do this remotely, as one mistake can leave you unable to reach the PC.
- Become root on the machine.
- Formulate a config file.
- Figure out the appropriate command line arguments, mine are as follows: (NATd is no longer a port, and is now distributed with FreeBSD)
- /usr/sbin/natd -m -f /etc/natd.conf
- -m - tries to keep ports consistant, and helps things like RPC work.
- -f - specifies the config file to use.
- Put the command line into rc.local.
- Set the line in /etc/rc.conf that states gateway_enable="NO" to
gateway_enable="YES"
- Configure your internal machines to use the NATd machine as a gateway.
- Reboot.
Here is my natd.conf... to start NATd on bootup I also added the following lines to /etc/rc.conf
natd_enable="YES"
natd_interface="ed0"
natd_flags="-f /etc/natd.conf"
begin natd.conf
use_sockets yes
same_ports yes
unregistered_only yes
dynamic yes
pptpalias 192.168.2.51
port 7778
interface ed0
redirect_port tcp 192.168.2.50:5800 5800
redirect_port tcp 192.168.2.50:5900 5900
end natd.conf
|
|
|
 |