The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Dealing with multiple bandwidth providers...

Discussion in 'General Discussion' started by SeñorAmor, Jan 31, 2007.

  1. SeñorAmor

    SeñorAmor Well-Known Member

    Joined:
    Dec 27, 2003
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    Here's my current setup:

    I have two routers, each with 2 network cards. One has an external IP, the other has an internal IP. I also have a webhosting box with cPanel that has a single, internal IP. It looks something like this:

    Box 1
    ------
    External IP: 1.2.3.4 (on ISP A)
    Internal IP: 10.0.0.1 (on my LAN)

    Box 2
    ------
    External IP: 2.3.4.5 (on ISP B)
    Internal IP: 10.0.0.2 (also on my LAN)

    cPanel Box
    ------------
    Internal IP: 10.0.0.3


    My first nameserver is on ISP A (Box 1). My second is on ISP B (Box 2). I have them both set up to forward all the appropriate traffic to my cPanel box. My problem lies in that the cPanel's box has a single gateway (Box 1). Any traffic that comes in on Box 2 meant for my cPanel box doesn't get sent back out Box 2. Websites are not resolving properly when they come in Box 2.

    I tried adding an alias on the network card for my cPanel box and giving it an IP address of 10.0.0.4, with a default gateway of Box 2 (10.0.0.2) thinking that if I redirected traffic from Box 2 to the new IP, everything would be fine. Unfortunately, it is not.

    I added the extra network device in the WHM setup and restarted the network card, and while an 'ifconfig' shows both IP addresses and WHM acknowledges both, I can't seem to get websites to resolve properly when they come in Box 2.

    I'm at a complete loss on what else to try. Any ideas and suggestions would be much appreciated.


    I hope this is clear. If not, please feel free to respond and I'll do my best to clarify.

    Thanks in advance,
    Jay
     
  2. SeñorAmor

    SeñorAmor Well-Known Member

    Joined:
    Dec 27, 2003
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    Anyone?

    Bueller?
     
  3. SeñorAmor

    SeñorAmor Well-Known Member

    Joined:
    Dec 27, 2003
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    Hello, hello?
     
  4. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    18
    Right now, all your internal IPs are on the same network, 10.0.0.x

    Try putting one of your routers on a different subnet, say 192.168.1.x

    On your cPanel box, setup a matching (second) IP address in the 192.168.1.x range and point the gateway to the proper IP. You'll end up with two IP addresses in different subnets.

    I think you were headed in the right direction, but by having things still on the same subnet it causes problems.
     
  5. SeñorAmor

    SeñorAmor Well-Known Member

    Joined:
    Dec 27, 2003
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    I think the problem lies in that you can only have one default gateway (right?). The gateway is assigned to NIC 1. Data comes in NIC 2, the server says, "Ooh, different subnet. Where's that default gateway?" and goes out NIC 1.

    Someone else has to have their server set up with nameservers on different ISPs. I realize that cPanel doesn't technically support a NAT'd environment, but even moving it out from behind my firewall, I'd still run into the same issue.
     
  6. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    18
    I'd agree you can only have one 'default' gateway, but that doesn't mean you can't have other gateways...

    It's possible to have a single server live on two distinct IP networks. Servers with two network cards are often used to offload backups onto the second card/second network.

    You're essentially doing the same split, but with one physical card. Even operating systems like Windows 98 will allow multiple IP/subnet/gateway combinations on a single card.

    In either case (single or multiple card), the 'default' gateway is used only when the computer doesn't know what to do with a packet... hence the 'default' part.

    Otherwise, it has information encoded into the data packet that says where it's supposed to go, and the IP stack will move it accordingly. So, information destined for the 10.0.0.x network won't travel on the 192.168.1.x network...
     
  7. SeñorAmor

    SeñorAmor Well-Known Member

    Joined:
    Dec 27, 2003
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    So it seems that I need to do some advanced routing to do this properly. I'm not a network guy, so does anyone have any info on where I can go to learn about some of this more advanced iptables stuff?

    Thanks.
     
Loading...

Share This Page