Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Feb 2003 11:45:52 -0500
From:      "Kevin D Re" <kevinr@mycomputerease.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Changing ISPs with out much interruption.
Message-ID:  <20030221164552.M88@mycomputerease.com>

next in thread | raw e-mail | index | archive | help
My Setup
                                           /--- FreeBSD2 (Web,ftp,ssh)
ISPA ---\                                  |--- FreeBSD3 (Webmail,mail,ssh)
        HUB1 --- (xl0) FreeBSD1 (fxp0)--- HUB2 
ISPB ---/                                  \--- Firewall --- internal network

FreeBSD2 192.168.2.1
FreeBSD3 192.168.2.2

x10 ip addresses:
ISPA 10.0.0.2, 10.0.0.3, etc, gateway 10.0.0.1
This is the current ISP which all internal traffic goes out.

ISPB 20.0.0.2, 20.0.0.3, etc, gateway 20.0.0.2
This is where I want all internal traffic to go.

These ip addresses are assigned to the outside network card (xl0) about 8 
total, 4 ip addresses for each ISP.

I have setup successful to have all incoming traffic using ISPB

The current default route is 10.0.0.1
I do a `route change default 20.0.0.2` which I would think tell all out going 
traffic to use ISPB but it don't. All traffic stops and I can from FreeBSD1 
ping both ISP gateways and the other 2 FreeBSD boxes.

I have connected a computer to HUB1 and setup the ip address and gateway for 
ISPB and it works fine.

FreeBSD1 is Ver 4.7 and using ipfw and natd
for debugging I set ipfw rules (rc.firewall) like this:
fwcmd = "/sbin/ipfw"
$fwcmd add divert natd all from any to any via fxp0
$fwcmd add pass ip from any to any

The nat.conf is setup like this:
redirect_port tcp 192.168.2.1:80 10.0.0.2:80
redirect_port tcp 192.168.2.1:80 20.0.0.2:80
redirect_port tcp 192.168.2.2:80 10.0.0.3:80
redirect_port tcp 192.168.2.2:80 20.0.0.3:80
etc for each service.

To summarize the problem:
I am try to use ISPB instead of ISPA as my main internet connection. The 2 
FreeBSD boxes are getting connected to successfully from ISPB but these and 
the internal network are using ISPA when I try to make a connect from them.
I have been to the point with the FreeBSD1 setuping it up with just one ip 
address from ISPB and the ISPB gateway and that does not work so I am 
thinking it is with the ipfw and/or natd not being setup right. I have play 
around and made changes to the rules of both with out luck.

I hope to have made my problem clear with as much info possible. Any question 
please ask. Thanks in-advance.

--
Kevin Re
ComputerEase Software
kevinr@mycomputerease.com

ComputerEase Software (http://www.mycomputerease.com)
Software for Contractors


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?20030221164552.M88>