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

linux

    Next

  • 1. Simple Socket Guidance
    Hi, I'm currently working on a project in which I need to run a process on one machine that can invoke a process on another machine over the internet. For example, pressing [enter] on my machine will run a script on another machine (with static IP) arbitrarily far away. I'm new to this sort of coding, so I just wanted to get a rough idea what I should be diving into. This would be the job for a socket, correct? Or servlet? Am I right in looking at Ruby and Python? If you could just steer me in the right direction, I can manage. Thanks a lot.
  • 2. Fair bandwidth distribution of an internet connection shared with IP masquerading
    Hi everybody ! I set up a Linux box (Fedora Core 4 on a Pentium III 833MHz processor and 128MB RAM) to share a broadband connection (dialup type : uses rp-pppoe) over a local Ethernet LAN. The material available on the net was of great help. The sharing worked flawlessly but then I ran into the next problem which the tutorials had not foreseen : Fair bandwidth distribution. Can anyone point me to any material on the internet or to any reading material which broaches on the subject of imposing bandwidth restriction using possibly iptables. Any other solution would be equally welcome as long as it does not call for using a proxy. Thanks in advance. --- Anirban
  • 3. Need some help in Routing in Linux
    Guys: I have some problem, can some Router expert give me a clue. we have two different subnets, 192.168.1(ADSL-Router) and 192.168.2 (regular SOHO router), this second router is connected to one of the port on first router and assigned Second Routers wan port as static IP addr (192.168.1.128), from 192.168.2 subnet, we can login to all machines in 192.168.1 subnet, whereas from 192.168.1 to 192.168.2, we can't login or ping at all, I added a route on 192.168.1 subnet, stull I can't access 2nd subnet machines, on first subnet, I added route using below command, also route looklike, all machines on both subnets are Linux machines only. [root@host1]# route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.128 [root@host1]# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.2.0 192.168.1.128 255.255.255.0 UG 0 0 0 eth0 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0 169.254.0.0 * 255.255.0.0 U 0 0 0 eth0 default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0 [root@thost1]# 192.168.1.1 is the gateway ip-address for 192.168.1 subnet, where as 192.168.2.254 is gateway ip-address for 192.168.2 subnet.
  • 4. integrate a ppp-connected PC to my LAN. arp problem?
    I want to integrate a remote PC "ted" connectet by ppp to my LAN (192.168.0.x). The interface is to the remote PC is: 192.168.0.52:192.168.0.220. The 220 is the remote PC. I can ping to. I can ssh to. But trying to connect to my LAN by DSL by ssh tunnel from somewhat else, I can't reach the PC that is connected by ppp. rex3:~ # route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.220 0.0.0.0 255.255.255.255 UH 0 0 0 ippp2 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0 I already completed arp-table: rex3:~ # arp -Ds 192.168.0.220 ippp2 netmask 255.255.255.255 pub rex3:~ # arp -a rex2 (192.168.0.51) at 00:06:7B:03:94:21 [ether] on eth0 easy (192.168.0.27) at 00:50:8D:6C:64:F1 [ether] on eth0 ? (192.168.0.198) at * PERM PUP on eth0 ted (192.168.0.220) at * PERM PUP on ippp2 PC easy is accessible, its a PC in my LAN. any hints? tia Ekkard
  • 5. which log files to check for hosts.deny
    I'm trying to get better control of my traffic on linux. I have placed about 100 IP addresses in my hosts.deny file. I am curious to know which log file I would use to see if any of these spammer IP's have been blocked. Thanks,

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

Postby laitkor » Mon, 21 Jun 2004 03:58:19 GMT

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)

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

Postby Snowbat » Mon, 21 Jun 2004 04:27:49 GMT





 http://www.**--****.com/ 

Similar Threads:

1.Two NICs, Two networks, secure websites

Hi!

I have a Cisco router (provided by the ISP) that offers 29 usable IP's.
 One of the public IP's is set to be the WAN IP of a simple SOHO
Linksys router that then creates a private network 192.168.1.0.  There
is a Linux server with Apache on the private network.  Port forwarding
on the Linksys router allows SSL access to secure web pages,
unencrypted HTTP, SSH, etc. to the Linux server.  This all is working
OK.

I need to have a 2nd SSL site running on the same Linux server.  So, I
installed a 2nd NIC and connected it to the Cisco router and used one
of the available public IP's.  I cannot connect to the new public IP
(via the new NIC), but can still connect to everything described in the
1st paragraph above.

I can ping out each of the interfaces (e.g. ping -I eth0 yahoo.com  and
  ping -I eth1 yahoo.com both work).  The results of route are:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
AAA.BBB.CCC.160 *               255.255.255.224 U     0      0        0
eth1
192.168.1.0     *               255.255.255.0   U     0      0        0
eth0
127.0.0.0       *               255.0.0.0       U     0      0        0
lo
default         192.168.1.1     0.0.0.0         UG    0      0        0
eth0

On the server, I can do   lynx https://192.168.1.2 and lynx
https://AAA.BBB.CCC.164.

>From outside of the server, https://AAA.BBB.CCC.163 works now, but
https://AAA.BBB.CCC.164 does not.  What needs to be done to allow
https://AAA.BBB.CCC.164 to work?  And/or, what can I do to troubleshoot
the problem?

eth0      Link encap:Ethernet  HWaddr 00:40:F4:E9:3F:3D
          inet addr:192.168.1.2  Bcast:192.168.1.255
Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6335 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5026 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:1373872 (1.3 Mb)  TX bytes:2199390 (2.0 Mb)
          Interrupt:16 Base address:0xf000

eth1      Link encap:Ethernet  HWaddr 00:0C:76:B4:CA:82
          inet addr:AAA.BBB.CCC.164  Bcast:AAA.BBB.CCC.191
Mask:255.255.255.224
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1582 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2133 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:100305 (97.9 Kb)  TX bytes:166007 (162.1 Kb)
          Interrupt:21 Base address:0x1000

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:209 errors:0 dropped:0 overruns:0 frame:0
          TX packets:209 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:22394 (21.8 Kb)  TX bytes:22394 (21.8 Kb)


Thanks!

2.Forwarding of multicast packets between two subnets with two NICS - Does not work

WHY DO I NOT GET ANY REPLY FROM A DIFFERENT SUBNET? WHY ARENT
IGMP/MULTICAST PACKETS BEING FORWARDED THROUGH THE LINUX BOX?

Here is my setup:

                               Linux Box with two NICS
PC1         router          NIC(eth0)---NIC(eth1)          router
 PC2
192.168.1.100 192.168.1.1 192.168.1.111 192.168.4.114 192.168.4.1
192.168.4.100


Linux Box:
---------
/proc/sys/net/ipv4/ip_forward


PC1
----
ping 192.168.4.1 - works
ping 224.0.0.1 - only get reply from 192.168.1.1 and 192.168.1.111


PC2
----
ping 192.168.4.1 - works
ping 224.0.0.1 - only get reply from 192.168.4.1 and 192.168.1.114

WHY DO I NOT GET ANY REPLY FROM A DIFFERENT SUBNET? WHY ARENT
IGMP/MULTICAST PACKETS BEING FORWARDED THROUGH THE LINUX BOX?

3.Connecting two networks with two linux boxes.

I have 2 networks each with a linux box as the gateway to the internet.

At the moment they are VPN'd together, but are close enough to get a 
cable run and I'd like to connct them like this to make it quicker
so each linux box will have 3 nics in it.

My question is possibly a dumb one! But what should the IP for the 3rd 
nic in each box be?

The networks are:
	network	   	-	linux box internal address
Box 1) 10.0.12.x/24 	- 	10.0.12.1
Box 2) 192.168.12.x/24 - 	192.168.12.1

Should the 3rd NIC in the box 1 be on the 192.168.12.x range, and vice 
versa but wouldn't that confuse the other network as it would think that 
it is a local IP  when it wouldn't be.

Should they both be on a different range althogether? And then set the 
routing up on each.

ie 3 NICS in each
Box1
internal 10.0.12.1
public 123.456.78.2
"intranet" 10.0.13.1

Box2
internal 192.168.12.1
public 423.243.123.32
"intranet" 10.0.13.2

If it was 2 networks with one linux box it would be easy, just not sure 
how you'd connect the two boxes together....

Any advice appreciated!

Cheers

Mark

4.How two bridge two DSL lines

5.Two network connections NICs not activating on Fedora 3 Linux 2.6.11-1.14_FC3

Hi,

   Running Fedora kernel 2.6.11-1.14_FC3

   This problem has been present since Fedora 2 (kernel 2.6 ?)

   I have a generic laptop with built-in UTP LAN socket and a Netgear
802.11b PCMCIA card.

   When the laptop boots, the onboard LAN is assigned eth0 and the
PCMCIA Netgear eth1 .

    Both appear as Active in the Network Device dialog - even if no UTP
cable is connected to the eth0 port .

   When UTP cable is plugged in, the eth0 can get DHCP IP Address from
the router and then connect out to the internet.

   However, when there is no UTP cable connected but there is wireless
card that shows steady green light, the device is not connected to the
router. I have to disable BOTH eth0 and eth1 then activate eth1 (the
wireless card) to get a DHCP IP address and then an active network
connection

   Is there anyway to get the NetGear wireless card on eth1 active and
usable after boot without going through all of this?

Thanks

Clive

6. Two Ethernet Jacks & Two Networked Boxes

7. Two screens, two kbds, two users ?

8. Change inet on two NICs without loosing connections - Want IPMP solution



Return to linux

 

Who is online

Users browsing this forum: No registered users and 60 guest