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
  #1   (View Single Post)  
Old 18th May 2008
relch relch is offline
New User
Join Date: May 2008
Posts: 1
Default fwd..help!

hello, just want to know the use of ipfw <b>fwd</b> keyword. can I use it to forward http request to an apache webserver that resides in my LAN?

pls provide samples for it. thanks!
experience teaches well, just strike the rock!
Reply With Quote
  #2   (View Single Post)  
Old 19th May 2008
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
Join Date: May 2008
Posts: 696

The IPFW fwd keyword passes packets destined for one host to another host. The packets are not modified in any way, which means the host the packets are being forwarded to has to know how to handle the unmodified packets.

The most common use of the fwd command is to redirect HTTP packets to a local proxy server, or to redirect SMTP packets to a local mail server:
# ipfw add fwd tcp from to any 80 in recv fxp0
# ipfw add fwd tcp from to any 25 in recv xl0
The next most common use is probably to redirect traffic through alternate routes/interfaces, usually VPN links.
# ipfw add fwd ip from to in recv re0
where is the remote IP of a VPN link, and is the private subnet of the remote network.

You probably don't want to use fwd. You want to look into natd(8), which does IP translations and port forwarding. If you are using FreeBSD 7.x, you can also use the new nat keyword with ipfw(8).

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
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

All times are GMT. The time now is 12:17 PM.

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