two dsl connections, two routers, dual nics on linux box , want to run two websites

Discussion in 'Linux Networking' started by Laitkor, Jun 19, 2004.

  1. Laitkor

    Laitkor Guest

    Hello,

    I have two dsl connections, with one public ip on each. I have a linux
    box with two nic cards.

    xx.xx.xx.xx(WAN)---ROUTER(LAN23.123.45.110) ---- MYLINUX
    (23.123.45.107) eth1
    yy.yy.yy.yy(WAN)---ROUTER(LAN192.182.1.1) ---- MYLINUX
    (192.168.1.100) eth0

    I have apache listening on both interfaces.

    Problem:

    1. How do I make the packets route back to the gateway from which they
    originate.

    Currently the gateway marked as "default" is able to serve content
    from the apache. The other one cannot.

    I tried adding static routes, but that didn't work.

    Any help is appreciated.

    Thanks
    --
    Jay

    ---------------------------------------------------------------------
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref
    Use Iface
    adsl-23-123-45- adsl-23-123-45- 255.255.255.255 UGH 0 0
    0 eth1
    23.123.45.0 * 255.255.255.0 U 0 0
    0 eth1
    192.168.1.0 * 255.255.255.0 U 0 0
    0 eth0
    loopback * 255.0.0.0 U 0 0
    0 lo
    default 192.168.1.1 0.0.0.0 UG 1 0
    0 eth0


    eth0 Link encap:Ethernet HWaddr 00:0D:87:57:A0:DE
    inet addr:192.168.1.100 Bcast:192.168.1.255
    Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:3060612 errors:0 dropped:0 overruns:0 frame:0
    TX packets:3577217 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:1566982235 (1494.3 Mb) TX bytes:1126616733 (1074.4
    Mb)
    Interrupt:11 Base address:0xe000

    eth1 Link encap:Ethernet HWaddr 00:40:05:39:0E:EA
    inet addr:23.123.45.107 Bcast:68.123.24.255
    Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:90635 errors:0 dropped:0 overruns:0 frame:0
    TX packets:31082 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:23017102 (21.9 Mb) TX bytes:13283751 (12.6 Mb)
    Interrupt:11 Base address:0xe000

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:11888 errors:0 dropped:0 overruns:0 frame:0
    TX packets:11888 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:6920794 (6.6 Mb) TX bytes:6920794 (6.6 Mb)
     
    Laitkor, Jun 19, 2004
    #1
    1. Advertisements

  2. Laitkor

    Snowbat Guest

    http://lartc.org/howto/lartc.rpdb.multiple-links.html
     
    Snowbat, Jun 19, 2004
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.