DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 20th May 2009
map7 map7 is offline
Fdisk Soldier
 
Join Date: Jun 2008
Posts: 75
Default natd redirect_port problems

I have a gateway which is running FreeBSD 5.1 and I would like to redirect an incoming/outgoing port to a computer on the lan.

I've been dong some reading and it looks like I need natd.

I've compiled my divert options into the kernel and get the following line in my dmesg on boot:
ipfw2 initialized, divert enabled, rule-based forwarding enabled, default to deny, logging limited to 100 packets/entry by default

My internet connection uses the tun0 device and my network is on interface rl0.

The natd command I've been trying is
# natd -interface tun0 -redirect_port tcp 192.168.1.2:80 80

192.168.1.2 is my webserver which runs apache and I can access this internally.

I cannot access it from the outside world, even after I disable any firewall settings.

I've tried with the commands
# sh /etc/rc.firewall simple
# ipfw add divert natd all from any to any via tun0
# natd -interface tun0 -redirect_port tcp 192.168.1.2:80 80

and that doesn't work either. Should I be putting that ipfw in my firewall or will it do the same thing manually? Is this the correct natd call? Do I have to setup a natd.conf file as I don't have one at the moment?
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Freebsd 7.0 natd problem with jail bsduser FreeBSD Installation and Upgrading 2 26th July 2008 12:40 AM
Pf need natd? TiN-MAN FreeBSD Installation and Upgrading 2 5th July 2008 08:25 PM
samba wont operate under natd/ipfw Johnny2Bad FreeBSD General 3 24th May 2008 09:46 PM
flush natd rules nenduvel FreeBSD Security 1 3rd May 2008 08:59 PM


All times are GMT. The time now is 11:25 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick