Firewall Wizards mailing list archives

FreeBSD 4.2 ipfw natd -- Port Forwarding?


From: Russ <xminer () home com>
Date: Tue, 19 Dec 2000 01:19:43 -0800

Hi, fist time poster, thanks for the cool mailing list...

I am using FreeBSD 4.2 and have set up a pretty good firewall using ipfw and natd via some tutorials and documentation I have found. So it works but now I need to customize it a little...

Question: How can I allow incoming connections through my firewall. The client lets me specify what port to listen to incoming requests on, before I was using a router that had built in port forwarding... So the client is set to listen on 8877 and router forwards incoming request to port 8877 to computer with ip 192.168.1.3 for port 8877, you get the picture?

I would like to learn how to write the rule in my ipfw script that might do the same thing, forward incoming requests to my external ip on port xxxx to internal ip xxx.xxx.xxx.xxx port xxxx. The port would not change of course...

how do I write the rule? I suppose this rule could be used for any incoming request, and I am sure people use it to allow access to http and ftp through a firewall, so there must be an acceptable rule to do it, any ideas?

$ipfw pass tcp "for port 8877 only" to 192.168.1.3:8877 via $oif (external interface) ? I have no clue how it should be.


_______________________________________________
firewall-wizards mailing list
firewall-wizards () nfr com
http://www.nfr.com/mailman/listinfo/firewall-wizards


Current thread: