Networking :: Multiple Gateways On Same Network?
Dec 1, 2010
I have 3 servers interconnected with IPs 192.168.150.1-3. First two has internet connection and third first server uses them as gateways. After googling and reading howtos I managed to get it working: The firewall for ssh on first server is defined
Code:
...
iptables -A EXTIN -p tcp --dport 23 -j ACCEPT
iptables -A FORWARD -p tcp -d 192.168.150.3 --dport 22 -j ACCEPT
iptables -t nat -A POSTROUTING -d 192.168.150.3 -p tcp --dport 22 -j SNAT --to 192.168.150.1
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 23 -j DNAT --to 192.168.150.3:22
...
On Seconds server:
Code:
...
iptables -A EXTIN -p tcp --dport 23 -j ACCEPT
iptables -A FORWARD -p tcp -d 192.168.150.3 --dport 22 -j ACCEPT
iptables -t nat -A POSTROUTING -d 192.168.150.3 -p tcp --dport 22 -j SNAT --to 192.168.150.2
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 23 -j DNAT --to 192.168.150.3:22
...
And on third route is defined like this:
Code:
ip route add default scope global nexthop via 192.168.150.1 dev eth0 nexthop via 192.168.150.2 dev eth0
It works, but the problem is that connections on third server are shown that their connected from 192.168.150.1 or 192.168.150.2. Are there is any way to keep original connection source address, when connecting to 192.168.150.3?
View 2 Replies
ADVERTISEMENT
Apr 6, 2010
I'm hosting a Sendmail Cyrus-Imap server on fedora 12. I recently installed a second NIC on a second internet gateway and successfully configured source based routing. Clients are able to connect over the mail.domain.com received from the gateway 192.168.0.1 to the interface 192.168.0.254. ETH0. Clients are also able to connect from pop3.domain.com and smtp.domain.com from the second gateway 192.168.1.1 to the interface 192.168.1.254. ETH1
I have cyrus-imap certs configured for the mail.domain.com and a Sendmial cert configured for mail.domain.com. My question is how would I tell sendmail and cyrus that the mail.domain.com goes out the ETH0 but deliver the second and third cert (eg cyrus sends pop3.domain.com and sendmail sends smtp.domain.com) to clients connected on ETH1?
View 1 Replies
View Related
Nov 17, 2009
I`ve got a network (192.168.1.0/24)with common internet gateway (gw 192.168.1.253).Everything works good and i have access to i-net through 192.168.1.253 from all loacl machines. Then I tried to make and internal server as a firewall for local subnetwork. It is CentOS 5.3 based.
Code:
[root@router etc]# uname -a
Linux router 2.6.9-89.0.16.EL #1 Tue Nov 3 17:15:02 EST 2009 i686 i686 i386 GNU/Linux
[code]...
View 4 Replies
View Related
May 11, 2010
I installed the CentOS v5.4 on a virtual machine vmware server v1.0. I put the the vmware ethernet on bridged mode and now I have an ip address, subnet mask and dns from my dhcp server from the the office where I am. I edit the file /etc/sysconfig/network and I put there the gateway ip. Now is okay but not at my home where I have another gateway ip. a script who switch between my gateways ?
View 4 Replies
View Related
Apr 4, 2016
I am having some troubles using iptable rules on two Servers that act as Gateways pointed to one backend server with only one interface.
To be more exact, i have 3 Servers, 2 of those have a public and a private interface, with different public ips but common private interface ( they connect to the same switch ), the last one only has 1 private interface and is connected to that same switch.
Those 2 servers also act as a gateway and a firewall for the private network.
My problem is that i cannot seem able to route traffic from both of those to the third one and back to the same public ip that the request came from ( effectivly using two gateways on the machine with only one interface ).
As a testing scenario i am using ferm for applying iptable rules that forward ssh traffic ( for example ) to the backend server, and it works well when i do it with one gateway.
When i apply something like this in /etc/network/interfaces on the backend server though:
Code: Select allauto eth0:0 eth0:1
# The primary network interface
allow-hotplug eth0
iface eth0:1 inet static
address 192.168.9X.XXX
netmask 255.255.255.0
broadcast 192.168.9X.255
network 192.168.9X.0
[Code] ....
Even though forcing selection of an interface from the backend server ( like curl --interface ) seems to work well, meaning that the request to the curl appear to happen from the correct public ip, i can still only use one of the public ips to access the server with the ferm rules. Ideally i should be able to ssh to the backend server from both public ips using their ferm rules for forwarding traffic to the backend server.
I feel like i am missing some details on routing that should happen on the firewalls as the backend server seems to be able to use both gateways to access the internet and receive replies from it.
View 2 Replies
View Related
Mar 24, 2010
I have a CentOS5 box I use to run ASSP for Anti-spam. It has a single NIC. I configure network settings using Webmin. I have two Internet connections managed by different routers.
Router 1 - 10.0.0.254 255.255.255.0
Router 2 - 10.0.0.250 255.255.255.0
CentOS - 10.0.0.30 255.255.255.0
Both routers port forward traffic on port 25 (SMTP) to the CentOS box. The SMTP connections only work for the router that is the default gateway on the CentOS box! If Router 1 is configured as the default gateway in CentOS then I can Telnet to that routers WAN IP on port 25 and successfully send mail! On Router 2 I get no connection unless I change the default gateway in CentOS to be the IP of Router 2 thern Router 1 SMTP connections will not work! I imagine that CentOS is sending out it's responses to the default gateway instead of the Router that initiated the port forward?
View 2 Replies
View Related
Jul 28, 2010
In my environment we are running DHCP on a Windows 2003 r2 server. This DHCP server also is used with Symantec's 3COM PXE for the desktops. So the desktop's can PXE boot into Symantec Ghost and re-image the PC's with a Ghost (GHO) file. This DHCP server is responsible for assigning IP addresses for all desktops on the network.
We also have several branch offices which this DHCP server provides IP addresses to. These branch offices are on a separate network so I believe this is possible. Each branch office is running a Linux server so I would like to use Clonezilla and allow users in these offices to PXE boot to the local Linux server to run Clonezilla and re-image their notebook/desktops with a specified image that is on the local Linux server in each office. My only concern is the use of the same DHCP server. Is this possible?
Another project I am working on is setting up LTSP with openSUSE in which I want to have about 10 or 15 diskless PCs boot up and retrieve the LTSP image but this would also use the same DHCP server and is on the same network as the regular desktops that use the Symantec 3COM PXE service so is this even possible? If not, any recommendation on how I could get it to work? Could proxyDHCP work or MAC filtering or even a seperate VLAN?
View 2 Replies
View Related
Apr 30, 2009
What traffic goes where? Why? Any bandwidth advantage? What if one goes down?
View 4 Replies
View Related
Nov 19, 2009
I have some novice to intermediate programming skills from a past life. What I want to do is create a program and run it on two separate computers to just get them communicating together over the network on a basic level. I would like to do this in a language that doesn't limit me to a specific OS, this way I can have a linux and windows computer talking. However, I would prefer a language that can be useful down the road as well. My second inspiration, next to networking, is web design and web programming, which I hope to dig into as well eventually.
I'm not aiming to do anything overtly-complicated. One example that comes to mind would be a program that forwards any typed characters on one computer over the network and displays them on the other, and vice-versa. I guess the program would run over TCP/IP. However, it would be nice to learn how to do this in a language that not only works on multiple OSes, but also has the ability to allow me to program my own communication protocol, aside from TCP/IP, down the road. My intention with all this is to learn some network programming for fun.
View 11 Replies
View Related
Jul 29, 2011
I have a pc running Ubuntu 10.10 with 2 wired net card and 1 wireless card, all of them connected to a router through which connected to the internet. My question is when I launch a connection, such as ping or visit a website with browser, which one connection the system uses or both of them? Can I manually specify one connection to use? How to do it?
View 3 Replies
View Related
Mar 5, 2010
I have a machine that I'm trying to setup as a reverse web proxy. It will have two NICs, eth0 will face the public network, and eth1 will face the "internal" network (connects to a switch that goes out to the other web servers that are statically assigned a private IP address).
When both interfaces are started, I can ping hosts on the 1.2.3.0 network and the 192.168.10.0 network without problem when doing so by IP, but if I try to run a ping or nslookup command with a DNS name, it does not work. I've tried commenting out my entries in /etc/resolv.conf and adding the DNS entries in the /etc/sysconfig/network-scripts/ifcfg-ethX files directly (DNS1=x.x.x.x and DNS2=x.x.x.x), but the results are the same.
View 2 Replies
View Related
Jan 14, 2010
I've got a co-worker who is trying to connect multiple devices to his wireless router - Xbox, Wii, TV, Dishnetwork box, etc. Not all of the devices are wireless however. He's had several thoughts on how to get this done and I know very little about this kind of thing so I thought I'd ask some of you.
His first thought was to buy a multi port bridge, but he doesn't like any of the ones he's seen so far.The other thought was to connect all of the devices to a switch and then use a single bridge, but he isn't sure if this would work.
View 8 Replies
View Related
Sep 20, 2010
I am total newby in Ubuntu 10.04. I have just installed it in my office where I have two networks card one connect to a router giving the internet access and the other connected to the windows based work network providing access to the work network sources. In XP everything works fine as I can keep both connections alive and have the results I want.
However although I don't know how to do it in Ubuntu 10.04. Till now I have setup the first connection directly to my router and I have internet access but I cannot set the other one. Another question is how I can force ubuntu to use the router connection as the default one when I log in.
View 5 Replies
View Related
Apr 7, 2011
I have a problem where multiple interfaces in my network manager have the same name. This means that I am unable to have different settings for each interface. Here is my setup:
Ubuntu 10.04 LTS
uname -a: Linux muon 2.6.32-30-generic #59-Ubuntu SMP Tue Mar 1 21:30:21 UTC 2011 i686 GNU/Linux
Adapter 1: 02:00.0 Ethernet controller: Intel Corporation 82573E Gigabit Ethernet Controller (Copper) (rev 03)
Adapter 2: HTC Desire tethered via USB. When I start from scratch, with no remembered networks in the network manager, the Ethernet is shown as "Auto Ethernet". When I then connect the HTC Desire, the new network is shown in the network manager also as "Auto Ethernet". Previously, when I right clicked on the network manager and selected "Edit Connections", there were multiple "Auto Ethernet" entries under the wired tab.
Now (and I do not know what changed, sorry), I only see one entry. When I edit this entry (say, add a route), then the route is added for both network interfaces. This used to still work, so I was not worried about the name clash, but now it is causing problems so I need to have a different name for each network interface.
View 1 Replies
View Related
Nov 10, 2010
Is it possible to create virtual network adapter on the same physical network adapter? or How to give or have multiple MAC Address to the same adpater? I m working on centos 5.3.
View 6 Replies
View Related
Feb 11, 2010
Is it possible to define multiple proxies in NM and switch between them?
View 1 Replies
View Related
Dec 4, 2008
What I want is quite simple, I have my PC running Linux Mint 5 (Elyssa), and I would like to connect it to both an internal network, which has a file/print server, another machine and will soon host a small cluster. I also have a wireless router connected to the tinterweb.
The thing is using my ethernet I want to connect to the internal network whilst simultaneously using my wireless to deal with the internet, I want to keep the internal network off the net as it really doesn't need to be connected. I can connect to my internal quite happily and also my wireless but not both at once.
View 5 Replies
View Related
May 15, 2009
if I want to do eth1, eth1:0, eth1:1 etc and automatically configure them at startup where do I put that in the network-scripts?
View 2 Replies
View Related
Oct 15, 2010
configure a server with two network interfaces? This system is physically moved from one network to another every few days (different buildings but connected by a VPN). I'd like to be able to control the IP address of the system depending on which port I plug the network cable into with a static setting. Right now the system will connect to the local network, but any requests to go beyond the subnet get lost. The only way I can get the system to talk outside of its subnet is to comment out the second interface.
/etc/network/interfaces:
auto lo
iface lo inet loopback
auto eth0
[code]....
View 2 Replies
View Related
Jun 27, 2010
For some simulation, I am trying to configure a setup of 3 ubuntu desktops (one of them with multiple network cards) to behave in the following way:
Each one of them should be a separate network not seeing the others (including multicast addresses) They need to have internet access through the machine with multiple network cards. So from the point of view of each machine they define a LAN in which it is the only device and have internet access through the gateway machine.
What do I need to do to configure these machines for the above setup?
View 6 Replies
View Related
Sep 26, 2010
I've got two network card interfaces on my computer, one wireless and one wired. The wireless card is connected to the Internet and the wired is connected to the LAN. When only the wireless card is active, Internet works. As soon as i enable the second wired card, Internet stops working. And it seems like Ubuntu chooses the wired card for Internet as soon as it's enabled.
Are there any ways to solve this? So my Ubuntu box always chooses the wireless card for Internet traffic and let me use the wired device for LAN only?
View 1 Replies
View Related
Oct 15, 2010
I can connect to my school's wireless network using the standard network manager, but often (not always) it repeatedly disconnects and reconnects every few minutes. Occasionally it also prompts me for the security information again (even after it previously connected successfully).
By running iwconfig when it's on the fritz, I can see that it's often switching access points for the network - which is what I think is causing the problem. It disconnects and reconnects even when the signal strength for the current AP is fine, and it will often switch to an AP with a weaker signal strength.
$sudo lshw -C network
Code:
description: Wireless interface
product: Realtek Semiconductor Co., Ltd.
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:05:00.0
logical name: wlan0
[Code]...
View 4 Replies
View Related
Jan 7, 2011
I have two NICs and both having different IPs and Default Gateways. Now CentOS by default picks only one default gateway and puts entry in routing table (route -n). I want to keep both default gateway in active mode to achieve redundancy. For example if traffic enters through eth0 then it goes out using default gateway of eth0 and if traffic enters from eth1 then it goes out using default gateway of eth1. I use command route add default gw 192.168.0.1 netmask 0.0.0.0 dev eth2 then both default gateways becomes active. Now I want to make sure that when server reboots both default gateways are setup. For this I wrote shell script/sbin/route add default gw 192.168.0.1 netmask 0.0.0.0 dev eth0/sbin/route add default gw 192.168.0.10 netmask 0.0.0.0 dev eth1I am calling this script via /etc/rc.local but it doesn't work on boot time however once server is booted and I execute script (sh script.sh) then it works fine.
View 1 Replies
View Related
Jun 2, 2010
I have a strange problem regarding networking on the Alix 2d13 running Ubuntu 10.04. The Alix has 3 physical network interfaces, lspci says:
Code:
00:09.0 Ethernet controller [0200]: VIA Technologies, Inc. VT6105M [Rhine-III] [1106:3053] (rev 96)
Kernel driver in use: via-rhine
Kernel modules: via-rhine
00:0a.0 Ethernet controller [0200]: VIA Technologies, Inc. VT6105M [Rhine-III] [1106:3053] (rev 96)
Kernel driver in use: via-rhine
Kernel modules: via-rhine
[Code]...
It seems, if more than one cable is connected, a random hardware port is chosen as eth0-eth2. If only one cable is connected the port that is connected is chosen as eth0-eth2. Any idea what's going wrong here?
View 2 Replies
View Related
Aug 12, 2010
How to work GNUGK for H.323 Gatekeeper.
I am having a problem, configuring static call routing on GNUGK
In the section
You can see that the routers Local-router1 and 2 has the same dialling plan.
What happens is the gatekeeper send calls randomly to one router or to the other when one of the matching extension is dialled.
What I am trying to do is to force
Any calls coming from Remote1 to go out only throught Local-router1
Remote1 =========================> Local-router1
And any calls from Remote2 to go out throught Local-router2
Remote2 =========================> Local-router2
View 1 Replies
View Related
Feb 4, 2010
Im trying to setup multiple domU through the default bridge setup. I am able to access only one of them through the network at a time. If you ping one of the domU it works perfectly but you cannot ping any of the others until you stop pinging the one and even then it takes a bit before you can. Ive looked around for a while and seen similar problems but nothing ever seems quite the same. Im probably missing something really stupid. Or is this the way the bridge is supposed to behave? Do i need to use a routed virtual network?
[Code]....
View 1 Replies
View Related
May 20, 2010
I have an old pentium 3 computer that has ~7 NICs installed. These NICs are attached to modems and other networking equipment. According to the linux ping page on computerhope.com, it seems that one could send a ping from a certain specified NIC. How would one go about this?
View 6 Replies
View Related
Jun 16, 2009
I have a CentOS 5.3 box with three network interfaces in it. Each interface is attached to a separate VLAN and I want traffic to stay on each network segment.What I can�t figure out is why I cannot get each interface to have its own gateway and everything gets sent through the default gateway.The basically takes my possible 3Gb total bandwidth and throws it down a single 1Gb pipe.Then on top of that, if I take down the interface (ifdown) that has the current default gateway,I loose contact to the other two interfaces.When I look at the routes, each one of the interfaces shows the gw as 0.0.0.0 and defers to the default route. So I delete the route and try to add a new route with:
[root@testsan ~]# ip route add 10.1.15.0/24 via 10.1.15.1 dev eth2
but end up with the error:
RTNETLINK answers: Network is unreachable
[root@testsan sysconfig]# cat network
NETWORKING=yes
NETWORKING_IPV6=no[code].....
View 5 Replies
View Related
Dec 29, 2010
I am setting up my home network. Currently, I have one computer (Munchen) which I have set in my router to receive SSH requests. This works just fine; I can SSH into that box from anywhere. I just put together a new computer, which I want to be a file repository, my ftp server, my http server, etc. What I would like is to be able to SSH into that machine from anywhere, then SSH into the other computers on that network from there.
Here is where I really don't understand the concept of what is going on. I can SSH past the router into one computer just fine either from anywhere (that makes sense to me). I can SSH from my new computer (Chemnitz) into Munchen (which is where the router points to and is running sshd) by using its local IP address, but I can't go from Munchen to Chemnitz (even though the server is running and the firewall should be allowing the connection). [URL]
Details of the system setup are below.
Munchen (receives all port 22 requests now)
Ubuntu 10.04
Chemnitz (I want to receive all port 22 requests and SSH into other computers on the network from it. Ultimately it will be a file sharing box, hosting a webpage, running an ftp server, etc.)
Fedora 14
View 8 Replies
View Related
May 18, 2011
I'm familiar with load balancing.. but Is it possible to actually bond multiple DSL lines together? I hear of ways to bond using MLPPP but that requires support from an ISP. Is there a way to actually bond without support from my ISP, or use say a cable modem and a DSL line together for faster speed / diversity?
View 2 Replies
View Related