• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Anyone here know how to use ipfw?

I'm trying to do port forwarding from my freebsd gateway to an internal freebsd box.

Port I'm trying to port forward is 3000

Here is my current rules

#!/bin/sh
/sbin/ipfw -q -f flush
# Set defaults
cmd="ipfw -q add " # build rule prefix
ks="keep-state" # just too lazy to key this each time
$cmd 00500 check-state
/sbin/natd -interface fxp0

$cmd 00505 divert natd all from any to any via fxp0
$cmd 00510 pass all from any to any
$cmd 00530 accept all from any any to <external ip> 3000 in via fxp0
$cmd 00535 accept all from any any to <internal ip> 3000 out via fxp0
$cmd 00540 divert natd all from any to <external ip> 3000 in via fxp1
$cmd 00541 divert natd all from <internal ip> 3000 to any out via fxp1
$cmd 00542 allow log tcp from any to <internal ip> 3000 via fxp0
/sbin/natd -n fxp0 redirect_port tcp <internal ip>:3000 3000

I'm still learning about ipfw so I probably have some mistakes somewhere.

Anyone see anything glaring wrong with my current rules set?
 
Back
Top