CentOS 5 :: How To Set Default Gateways Of Both NICs
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
ADVERTISEMENT
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
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
Dec 28, 2009
I am trying to install CentOS 5.4 64-bit on a server with two NICs, one of which allows for iSCSI boot. I want the NIC that allows for iSCSI boot to connect to the iSCSI target on my 169.254 subnet. I want the other NIC to be connected to my 192.168.1 subnet so that it can reach the Internet for the CentOS Network Install.
Anaconda only configures one NIC, leaving me with an iSCSI target and no Internet or with Internet and no iSCSI target. Is it possible to configure both NICs in Anaconda?
View 2 Replies
View Related
Mar 30, 2009
I have a motherboard which has 4 x 1Gbps Ethernet controllers. I would like to use it as a Gateway for my home network. I have a static IP from my ISP which I can use to configure eth0 (I haven't done it yet as the LE-565 is currently sitting behind my Netgear router until I've got DHCP working). I would like to use eth1, eth2 and eth3 for my LAN. How do I set things up so that DHCP is handing out IP addresses on the same subnet (192.168.0.0/24) on all three interfaces?
P.S. I think what I'm asking is: how do I combine all 3 interfaces to behave like a switch (ie. just like my Netgear router)?
View 6 Replies
View Related
Jan 18, 2010
I have a Proliant DL 120 G5 with CentOS 5.4 and I have installed a Brodcom Corporation Netxtrem BCM 5722 Gigabit Ethernet PCI. So I have two interfaces: eth0 broadcom eth1 Intel The eth1 works, instead eth0 don't work. I can ping itself and 127.0.0.1 but I can't ping the gateway. The results of netstat -nr is:
[code]....
View 1 Replies
View Related
Feb 23, 2010
My setup is as follows:
eth0 - lan ip
eth1 - WAN ip
I have installed a sip server on the box. From the box I would like to access machines on wan and lan. First of all, is it possible? If yes, I have setup up the nics with default wan gateway. However, when I try to ping wan url, no response. Are there other things I need to do to accomplish this?
View 2 Replies
View Related
Mar 31, 2011
configuring DHCP server with two NICs. I need DHCP server with 2 NICs:
eth1 - 192.168.103.11
eth2 - 192.168.123.11
The client also has two NICs and suppose to receive ip addresses eth1 from 192.168.103.0 and eth2 from 192.168.123.0 Here is the dhcpd.conf from dhcp server:
ddns-update-style interim;
authoritative;
ignore client-updates;
[code]....
View 2 Replies
View Related
Jun 14, 2011
I just installed CentOS 5.2 on a mini Atom server and it wont recognize the nics. Not sure what kind they are, think they are Intel. (built in)It's the first time this has happened to me. Where do I start to get it to recognize the nics? Normally it works out of the box.
View 5 Replies
View Related
Dec 8, 2009
I have a program that attaches to an interface. I can run two copies of the program on two systems (each running one instance), connect it to a switch, say 1.1.1.1 & 1.1.2.1. In this configuration two instances of the program can communicate and everything is fine.
Now, to reduce cost, it want to use only one system with two nics connected to the same switch, running two instances of the above program, each instance attached to two interfaces respectively on the system. I have the following settings:
eth1 Link encap:Ethernet HWaddr XXXXXXXXXXXXXXX
inet addr:1.1.1.1 Bcast:1.1.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth2 Link encap:Ethernet HWaddr XXXXXXXXXXXXXXX
inet addr:1.1.2.1 Bcast:1.1.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
[Code]...
View 6 Replies
View Related
Nov 9, 2009
I have configured CentOS 5.4 as a router/firewall (iptables) as such, and it is working fine:
eth0 - Public IP/Intenet, DHCP
eth1 - 192.168.0.0 internal "net1"
eth2 -10.0.0.0 internal "net2"
I want to add a fourth NIC, eth3, which will be assigned its own Public IP/Internet address (thru DHCP; my ISP provides two). The purpose it to route all net1's internet-bound traffic through eth0, and all of net2's internet traffic to eth3. This allows me to use one router/firewall machine instead of two separate ones. I anticipate that without some specific routing instructions, the default route will be eth0 for all net1 and net2 internet traffic (eth3 will be ignored).
I thought of using just one NIC (eth0) but create an alias (eth0:0), but IPtables (and possible DHCP) can't differentiate between the two (besides, nics are inexpensive). Is there a way to do this through routing commands, or even use iptables prerouting/forward functions (or is using iptables problematic)?
View 1 Replies
View Related
Apr 4, 2010
I have a whitebox server with three network adapters, two gigabit adapters using the intel 82573V chips, and an intel pro/100 adapter based on the 82562 chip. These are embedded on an MSI motherboard. None are passing traffic.I initially booted the box using a Knoppix 5.0.1 CD, and the NICs worked fine. When I installed CentOS 5.4, no joy.Interestingly, Intel recommends the e1000e driver (which I am using), but the Knoppix CD used the e1000 driver. Anyway, I pulled an updated e1000e driver from elrepo,installed it, and verified that it was in use with 'ethtool --driver eth2', and the correct driver/version was displayed.
Symptoms are no traffic passes, rx/tx packet counts in ifconfig are both 0 (no errors, either). Routing table looks fine; three routes: one for 169.x.x.x, 172.16.x.x (my subnet), and one for 0.0.0.0, all destined for eth2, and all up. When I ping 127.0.0.1, and the local adapter address, I get good replies. As soon as I ping a remote host on my subnet, I get 'Destination host unreachable'. Now, at one point, I actually got it to work. I applied a small patch from Intel to change a value in the EEPROM, rebooted as instructed, and the adapter came up and passed traffic. I did a 'yum update' to update my packages, and shortly thereafter, everything stopped working again.
View 6 Replies
View Related
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
View Related
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
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
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
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
Dec 18, 2009
I have a question about using taskset. I am using Core 2 Quad box. I set the default affinity to CPU 0, by doing the following:
Edit: /etc/rc.d/rc.sysinit
Addline: /bin/taskset -p 1 0
That has been working fine for me, but from searching the web, I found some suggestion about adding an additional line:
/bin/taskset -p 1 $$
What does that line do?
I checked the man page of taskset and some references for regular expression, and I couldn't find the explanation about the $ character. By the way, 0 for CPU 0, correct? I checked via htop and seemed to be correct...
View 1 Replies
View Related
Dec 24, 2009
I just set up a test CentOS 5.4 host to run the Freeswitch IP PBX. Although the process is up and running and I can connect to the host through SSH, none of the IP phones can connect to Freeswitch:
Does someone know if CentOS comes with a firewall by default that would allow SSH connections but nothing else? "ps aux" returned nothing that looked like a firewall process.
View 2 Replies
View Related
Jul 30, 2011
I have installed samba 3.x on centos 5.x i wan to set default wallpaper for the users in my domain how it can be done.
View 1 Replies
View Related
Mar 12, 2009
I've noticed that on one of our servers apache is running on nice 19.Any idea where can I change it back to the default 15?I know I can change it on the apache startup script, but I thought it's probably better to change the default value that was probably changed somewhere.It is running as a service on startup.
View 1 Replies
View Related
Apr 22, 2009
I have managed to blow up something trying to follow this:http://wiki.centos.org/AdditionalResources/Repositories/RPMForgeHere is what i get when i try: yum update
Quote:Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.nuvio.com
[code]....
View 4 Replies
View Related
Jul 9, 2009
Because I keep a lot of data on a Netgear ReadyNAS which can be presented as a NFS server, I would like to have the default CentOS user have a uid and gid that match those for the user that owns the main NFS share. That way I can treat it as if it were a directory that I owned on the local machine. I'm probably going to install CentOS 5.3 over again to get a totally clean system. What is the neatest way to ensure that the default user has the desired uid and gid? Or is there a better way to work with the NAS? (Right now I'm running it with CIFS shares, but these are quirky and do not behave quite like a local file system, I'm hoping that NFS would be more consistent, but previously attempts to run NFS were hampered by different uid and gid values).
View 1 Replies
View Related
Aug 9, 2010
when I installed my server I had an FTP server running, I thought it was vsftpd. I stopped vsftpd one day though, and I could still FTP into my server. This mystery FTP daemon is SFTP (using port 22), and now it does not work. I've tried enabling vsftpd and I still cannot connect to my server. I've checked my firewall and I have FTP and SSH allowed. What might this mystery FTP program have been?
View 7 Replies
View Related
Feb 27, 2011
I try to forward all the network traffic on specific port from my VPS to home PC.The problem is that I have dynamic IP at home so I've installed Dynamic Update Client (DUC) from no-ip.com.I also use 'redir' software on Centos VPS to redirect the traffic and everything works fine till my ISP change the IP of my home PC.Does Centos cache DNS queries by default (nscd is not running)?Is there a some way/software that will periodically check if the IP of particular domain has changed and update accordingly.
View 8 Replies
View Related
Jul 6, 2011
I have a dual boot PC, installed Win XP first, then Centos 5.5 While installing Centos, I set Centos as default. So at boot up time, it does give a choice of selecting from the two if pressed any key, otherwise boots Centos. Now I wish to set it in such a way that Windows is the default OS to boot.
My grub.conf file:--
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition.
[code].....
View 14 Replies
View Related
Mar 20, 2009
I just installed CentOS 5.2, and would like for xterm to be my default terminal instead of the gnome-terminal. I was able to do this on a RHEL4 system and Fedora 9, but I can't figure out how to do it in CentOS.
Here's the output of uname:
Linux 2.6.18-92.1.22.el5 #1 SMP Tue Dec 16 11:57:43 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
View 2 Replies
View Related
Mar 26, 2009
I just installed PHP 5.2 using this guide [url]
The install did work without errors and is listed correctly on yum but isn't working when I test a php script.
So now I need to downgrade back to the php 5.1 but yum is now stuck on this atomic repository, how do I get back to the Centos repository and downgrade PHP to 5.1?
View 17 Replies
View Related
Jul 16, 2009
after I yum update, I've got this error on boot.
Press 'I' to enter interactive startup.
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
Setting clock (utc): Thu Jul 16 18:54:50 CEST 2009 [ OK ]
[Code]....
View 19 Replies
View Related