Linux Server and Workstation Configuration How To

  • Decrease font size
  • Default font size
  • Increase font size
  • default color
  • red color
  • green color
Home Manual For Admins ipfw nat on FreeBSD 7
ipfw nat on FreeBSD 7 PDF Print E-mail
Sunday, 11 April 2010 07:40
AddThis Social Bookmark Button

In the kernel configuration add:

options IPFIREWALL # firewall
options IPFIREWALL_VERBOSE # enable logging to syslogd (8)
options IPFIREWALL_DEFAULT_TO_ACCEPT # allow everything by default
options IPDIVERT
options IPFIREWALL_FORWARD
options DUMMYNET
options IPFIREWALL_NAT # ipfw kernel nat support
options LIBALIAS

in /etc/make.conf:

CFLAGS + =-DIPFIREWALL_NAT

Then rebuild your system:

cd /usr/src/; make builworld & & make kernel KERNCONF = YourKern & & make installworld reboot

In the configuration file ipfw:

NatIP = "111.111.111.111"
ipfw nat 123 config ip $ (NatIP) log
ipfw add nat 123 10 ip from 192.168.0.0/16 to any
ipfw add nat 123 20 ip from any to $ (NatIP)

Enjoy the kernel nat

 

Add comment


Security code
Refresh

Useful Links

Follow us on ...

  • Digg: hgevs
  • Facebook Page: 180986722511
  • Linked In Group: 2571120
  • Ning: linuxconfignet
  • Twitter: linuxconfignet

Friends

Thanks David Ayvazyan for provided useful information and discussions.
www.gnu.am (Armenian Translation)