Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Nov 2001 11:39:15 -0800 (PST)
From:      Ken Bolingbroke <hacker@bolingbroke.com>
To:        Doug Lee <dgl@visi.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Can I route TCP/UDP traffic by destination port?
Message-ID:  <Pine.BSF.4.21.0111021110270.2063-100000@fremont.bolingbroke.com>
In-Reply-To: <20011102133940.K9714@kirk.sector14.net>

next in thread | previous in thread | raw e-mail | index | archive | help


On Fri, 2 Nov 2001, Doug Lee wrote:

> Can I possibly tell my FreeBSD box to send TCP/UDP traffic bound for
> ports 137-139 via a different route than all other traffic, and can I
> route responses back similarly (the other end of the VPN is also a
> FreeBSD box)?  It would be really nice if I could do this without
> using the VPN as a pathway, but I think I could handle it either way.

The 'fwd' function of ipfw would probably work for this.  Ie; if the
gateway for your alternate route is at 10.1.2.3, you might do something
like this:

  fwd 10.1.2.3 tcp from any to any 137-139
  fwd 10.1.2.3 udp from any to any 137-139

The 'from any to any' will likely be too liberal for your needs.  Adjust
it for your local network such that it forwards all traffic to ports
137-139 at only external hosts with this rule.

Ken Bolingbroke
hacker@bolingbroke.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0111021110270.2063-100000>