Re: Multiple Internet feeds to a single machine.

From: Ken Bolingbroke (freebsd_at_bolingbroke.com)
Date: 05/13/04

  • Next message: Lefteris Tsintjelis: "Re: Digiboard PCI Xem driver"
    Date: Wed, 12 May 2004 18:20:59 -0700 (PDT)
    To: "Eli K. Breen" <eli@gopostal.ca>
    
    

    On Wed, 12 May 2004, Eli K. Breen wrote:

    > Has anyone successfully used two different Internet connections to feed
    > a single BSD machine, without BGP?

    Yes, I've done this.

    > Also, it is possible to have two copies of natd running on different
    > ports in order to accomplish this (each with their own config file)?
    > natd-a : 8668,
    > natd-b: 8669 and have the following rules in ipfw:

    Yes, this works, and this is almost just what I did myself.

    I have a DSL line and a cable connection. I wanted to be able to easily
    switch my default route from one to the other as needed (they go offline
    occasionally), and I also wanted to be able to access my server from
    outside via either connection.

    I used 'ipfw' to sort things out correctly. The main key for me was to
    apply a 'fwd' rule to make sure things went out the right line.

    That is, the main problem was that if my default route pointed at DSL, if
    a connection came in on cable, then the response would try to go out on
    the default route through DSL. But the DSL provider would reject anything
    not coming from my DSL IP. And I couldn't NAT it as coming from my DSL
    IP, because then the original client wouldn't recognize my response.

    So 'fwd' would set the next-hop to the correct gateway. That created a
    new problem, though...a match on a 'fwd' rule aborts further processing of
    the ruleset, and this broke my rules, including NAT. I could have perhaps
    worked around that by replacing all my 'accept' rules with 'fwd' rules,
    but that was just too ugly.

    Instead, I hacked the ipfw.c source code to make any 'fwd' matches
    continue with the rest of the rules. That way the next-hop would be set
    as I wanted it, but I could still apply all my firewall and NAT rules.

    This worked beautifully for quite a long time and I was able to easily
    access either Internet connection from both inside and outside. Recently
    though, the gateway machine burned out and I lost both hard disks on it,
    including the copies of the source code modification and my rule sets. I
    haven't yet recreated it, and I'm hoping to find a better solution that
    doesn't require hacking ipfw.c.

    But if you come up short on any other solution, modifying the 'fwd'
    behavior can do the trick decently.

    Ken Bolingbroke

    _______________________________________________
    freebsd-stable@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-stable
    To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"


  • Next message: Lefteris Tsintjelis: "Re: Digiboard PCI Xem driver"

    Relevant Pages

    • Re: dsl & firewall design question
      ... > I have a DSL modem connected to a LinkSys ... NAT (note i said NAT not firewall. ... appliance to the DSL connection. ...
      (comp.os.linux.security)
    • Problems Logon on Ras Server
      ... i have a win 2k SP4 server with ras configured as vpn server. ... The nat is done on the router. ... The user id I use to try logon is enabled for dial in connection. ... When i try to connect a client using a Dial up or another dsl line ...
      (microsoft.public.win2000.ras_routing)
    • Re: Yet another "network cable unplugged" issue (w/DSL)
      ... I have ATT DSL service on two PCs, the main one in my basement office, and secondarily on my son's PC upstairs. ... I should mention that my main PC uses a 2wire 1000HW DSL modem, and the second one connects via HPNA with a 2wire PC Port USB connection. ... The PC Port is properly connected as indicated by its power light, as well as being connected to its phone line, which is in turn connected to the DSL filter which is plugged into the wall. ... I suspect that the ATT tech replaced your original 2wire filter that went between your 2wire gateway and the wall jack with a standard DSL filter. ...
      (microsoft.public.windowsxp.network_web)
    • Re: OT udp port 138 BROWSER traffic
      ... >> dsl issues extend from at least June, and I could say more, but won't. ... >> issues that are interfering with my connection at their end. ... >> happening is the router is simply ignoring my traffic, ... it was a BAD filter that was not doing it's job. ...
      (comp.os.linux.security)
    • Re: connecting a FreeBSD-4.10 to Internet using DSL with static ip address
      ... I take this system around to a site using cable, dsl, my office where I connect ... Both the cable modem and the DSL modem I connect ... The DSL connection setup uses an ADSL modem ...
      (freebsd-questions)