Welcome to FreeBSDFreaks.net!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

DNAT using IPFW

 
   FreeBSD Hosting (Home) -> FreeBSD Handbook RSS
Next:  savage 8 - specs for xf86  
Author Message
Warrick FitzGerald

External


Since: Jul 30, 2003
Posts: 1



(Msg. 1) Posted: Wed Jul 30, 2003 6:45 pm
Post subject: DNAT using IPFW
Archived from groups: comp>unix>bsd>freebsd>misc (more info?)

Hi All,

I'm setting up a Firewall using FreeBSD and can not seem to find anything
in the FreeBSD handbook on proxy ARP.

I am trying to setup DNAT, so that users on the outside can connect to a
server on the inside of my network.

If my outside interface is 5.5.5.5 and I want 5.5.5.6 to be DNAT'd back to
a private host I am unsure of the best method to getting my outside
interface to reply to ARP requests for the 5.5.5.6 address.

Should I add the 5.5.5.6 address to the interface, or is there another
proxy arp tool I should use?

Thanks
Warrick

 >> Stay informed about: DNAT using IPFW 
Back to top
Login to vote
Brent Bolin

External


Since: Sep 24, 2003
Posts: 3



(Msg. 2) Posted: Thu Jul 31, 2003 8:46 am
Post subject: Re: DNAT using IPFW [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Warrick FitzGerald" wrote in message ...
> Hi All,
>
> I'm setting up a Firewall using FreeBSD and can not seem to find anything
> in the FreeBSD handbook on proxy ARP.
>
> I am trying to setup DNAT, so that users on the outside can connect to a
> server on the inside of my network.
>
> If my outside interface is 5.5.5.5 and I want 5.5.5.6 to be DNAT'd back to
> a private host I am unsure of the best method to getting my outside
> interface to reply to ARP requests for the 5.5.5.6 address.
>
> Should I add the 5.5.5.6 address to the interface, or is there another
> proxy arp tool I should use?
>
> Thanks
> Warrick


You can either redirect by address or tcp/udp

redirect_address private public
You need to alias a public address for this.
Don't forget netmask 255.255.255.255

redirect_port tcp private:http 5050
redirect_port udp private:http 5050

(well known service names can be used)

or

redirect_port tcp private:http public:5050
redirect_port udp private:http public:5050


There are two steps here.

1. your /etc/natd.conf rules(the above) or can be done on command line
2. your firewall rules (I find keep-state the best for this)

ipfw add tcp from somewhere to 192.168.50.60 5631 setup keep-state
ipfw add udp from somewhere to 192.168.50.60 5632 setup keep-state
(the above firewall rules would be for pcanywhere)

I don't know about the ARP thing.

Cheers...btb

 >> Stay informed about: DNAT using IPFW 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
ipfw and Webmin. - Hi all, If anyone out there uses Webmin Firewall module to admin a FreeBSD module, I could use a hint on something. In the FreeBSD handbook, it says one must put the "IPFIREWALL_DEFAULT_TO_ACCEPT" option in the kernel, OR make sure allow r...

Installation & fdisk partitioning (slices) - I picked up a copy of the "FreeBSD Handbook 2nd Ed" the other day, it came with a installation disk for version 5.1 Current and that is what I am trying to install. This is my first attempt to do anything with FreeBSD. First let me describe my...

CVSup vs. portupgrade - Reading from the FreeBSD handbook on "Using the Ports Collection" leaves me a bit confused wrt CVSup and portupgrade... do these utilities accomplish the same thing? Thanks, Jay _______________________________________________..

configuring freebsd dhcp server/router to listen on device - Hello, Im trying to move away from my linksys wireless router and move onto an old Pentium 200 Mhz I have. It will be the gateway between my modem and my network. I installed isc-dhcp3 on the box and took the sample dhcp.conf file in the freebsd..

PPP - Hi! I'm french and don't understand the chapter 18.2.1.2 (Creating PPP device Nodes) in the freeBSD handbook. Precicely I don't understand what is N in the first paragraph. Is it necessary to change the tun0? I have an other question.(I'm sorry if it..
   FreeBSD Hosting (Home) -> FreeBSD Handbook All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]