Date: Sat, 29 Mar 2008 21:08:49 +0100 From: Robert Jesacher <jessy@sicha.net> To: Tuc at T-B-O-H.NET <ml@t-b-o-h.net> Cc: freebsd-questions@freebsd.org Subject: Re: Quick+easy port redirect Message-ID: <67DFEA65-9B33-462F-A95C-5EEF328138AC@sicha.net> In-Reply-To: <200803290025.m2T0PYZc070500@himinbjorg.tucs-beachin-obx-house.com> References: <200803290025.m2T0PYZc070500@himinbjorg.tucs-beachin-obx-house.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 29.03.2008, at 01:25, Tuc at T-B-O-H.NET wrote: > Hi, > > Is there a quick/easy (cookbook?) way to do port > redirects. Basically I want that anything that leaves > a specific interface to any ip on port 80 go to > 192.168.0.1 port 87. > > I'm using ipfw for some other things so it has to > work and play well with that. > > Thanks, Tuc In case you want to try transparent proxying you need to look into firewalling. I can only tell you how this would work with OpebBSD's PF since I use it myself and quite like it. :-) Have a look at pf.conf(5), but it should work like this (in /etc/ pf.conf): +++++++++++++ int_if = "em0" rdr on $int_if proto tcp from $int_if:network port { 80 } -> 192.168.0.1 port 87 +++++++++++++ In this example you need to specify your network interface as int_if (in my case it is em0) If this doesn't suit your situation, you probably need to give us more information: The kind of network setup you use (eg internal -> firewall -> external) and what needs to connect to and from where. do you have a firewall solution in place (PF, ipfilter, ipfw)? And what do you need to achieve? br & good luck, Robert
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?67DFEA65-9B33-462F-A95C-5EEF328138AC>