Date: Tue, 16 Mar 2004 22:01:17 -0800 From: "J.T. Davies" <jtd@hostthecoast.org> To: <freebsd-ipfw@freebsd.org> Subject: Internal routing to different gateway Message-ID: <002701c40be5$43298f70$3301020a@hostthecaost.org> References: <1078597745.1981.15.camel@w1-par1-fr.corp.ndsoftware.com> <20040317021928.GA26065@scylla.towardex.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello everyone (again), I've come up with a brainstorm. My situation is this: I have an internal mail server running qmail on FreeBSD (ip of 10.2.1.52). I have two gateway/routers:: Internal IP's of 10.2.1.1 and 10.2.1.2, each has their own external IP's. The mail server (10.2.1.52) has a default_router set as 10.2.1.1. However, traffic coming in from 10.2.1.2 is answered via 10.2.1.1 (and not going back out the original route of 10.2.1.2). Of course this doesn't work because the NAT tables don't sync up between the two, so 10.2.1.1 doesn't know where to route the reply traffic. Incoming traffic on 10.2.1.1 works very well. Here's my potential solution...please tell me if there's a better way (through another port) or if I'm on a good track. ========== I create an IP alias on the mail server (10.2.1.53) and create routes in natd on 10.2.1.2 to route SMTP and POP3 traffic to the new alias IP. I enable IPFW on the mail server (defaults to allow connections because it's internal). I'll add two rules: ipfw add fwd 10.2.1.2 from 10.2.1.53 to any out via vr0 ipfw add fwd 10.2.1.1 from 10.2.1.52 to any out via vr0 (I think the syntax of the rules are right...if not, I'll experiment to perfect them) ========== Thoughts? J.T.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?002701c40be5$43298f70$3301020a>