General :: Force Server To Open Connections Via Eth0:0 Not Eth0?
Mar 3, 2010
I got two IP's in my dedicated server. Both are external IP's. I would like to make connections using 2nd IP address under eth0:0 interface. For example: when using "lynx whatismyip.com" should display my 2nd IP. How to do this using iptables ?
I have two servers on a vlan at my datacentre/colocation and previously both servers had public IPs on their eth0 interfaces. The servers are HP ProLiant DL360s - one is a G4 and one is a G5 The newer G5 is now the LAMP server and the G4 has been retired and I want to repurpose it as an iSCSI target using openfiler freenas or similar.
My G5 has public/static IPs lashed to the eth0 physical interface and the eth1 is not configured to do anything yet. The G4 will have both interfaces available - perhaps one for ssh access from one of my static public IPs and the other to be a private IP on the local vlan. Here is what I am trying to get my head around...
The G5 eth0 - Public IP - full LAMP services on two or three virtual interfaces eth1 - Private IP 192.168.0.1 The G4 eth0 - Public IP for ssh eth1 - Private IP 192.168.0.2
Because my traffic between eth1 on these boxes is via private IPs on the local private vlan it doesn't add to my quota for bandwidth. How do I go about configuring the routing and gateways and other aspects of this so that I can run a private IP space network between the eth1s and still serve the outside world from the eth0s...
I am afraid that if I assign the private IPs to the eth1 interfaces the routing may either not work or interfere with the access to the production internet facing interfaces (eth0s).
If I uncheck and recheck "Enable Networking" in the Network Manager Applet 0.7.996 I would expect the wired network to disconnect (which it does) and reconnect (which it does NOT). So I tried sudo ifdown eth0 and got
Quote:
Ignoring unknown interface eth0=eth0.
ifconfig tells me
Quote:
eth0 Link encap:Ethernet HWaddr 00:25:64:e8:18:2c inet addr:192.168.0.112 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::225:64ff:fee8:182c/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
[code]....
so I am at a loss. How do I stop and restart the network interface short of rebooting the machine?
I'm not sure how long ago this happened but eth0 seems to have vanished from my computer. wlan0 works fine and when I plug into the switch there is carrier detect.
Code: 21:35:43 ~:$ ifconfig eth0 up eth0: ERROR while getting interface flags: No such device 21:55:49 ~:$ lspci 05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 05) 07:00.0 Network controller: Intel Corporation Ultimate N WiFi Link 5300 After that i have no idea where to search for problems next, any ideas would be greatly appriciated (can't spell) ubuntu 10.10
I try to generate a server client code. What i try to do is sending video streams from eth0 and eth1 to the other server programs' eth0 and eth1. In order to do that, i decided to use SO_BINDTODEVICE. But the code is not working. Am i misunderstood the usage of SO_BINDTODEVICE.
1-Defining two ports 2-Defining two sockets 3-Assigning host ips on them
5.10 Breezy configured as machine controller. Works great eth0 is a fixed IP to communicate with controller comms board. Not easy at all to alter - the comms board is hard coded to listen on eth0 for commands.
I can use eth1 as the default gateway and ping google.com, etc. But when I now attempt to communicate with the controller with netcat, e.g.
Code: echo !HH | nc 192.168.1.6 80
I obviously never get an answer since the request is passed via eth1. Using the -g option with netcat doesn't work either. I had a look at iptables but it doesn't seem to be able to do what I want. How I can still use eth0 as my communication port to the controller whilst eth1 is the default gateway?
I've got a machine running 9.10 with two network interfaces, one being motherboard based (atl1) and the other in a PCI slot (e100). By default at boot the interfaces come up in the wrong order. I'd prefer to have the e100 come up as eth0 instead of eth1. And then have the atl1 come up on eth1 instead of eth0. Both interfaces use static addresses and IP4 routing should be active across them. Where do I configure things to force the specific settings?
My network name is eth2 it was changed by some reason and now i got these errors... i installed, reinstalled, re re installed, tried to run the asistant but no luck :/
Code:
* Stopping the Firestarter firewall... eth0: error fetching interface information: Device not found eth0: error fetching interface information: Device not found eth0: error fetching interface information: Device not found
On my machine (Desktop PC) I have 2 network card : wireless (rt61 802.11) and a wired card (BCM44). When I install debian 5.
The wired card is detected and logical name eth0 is assigned, while wireless is not assigned I install firmeware* software to configure the card. It is done in some way ( I used mnetwork from mepis, it works fine).
Now the problem: eth0 disapears, and no eth0 inteface found? ifconfig gives just wlan0.
Question: Why there is no eth0, it was before configuration of wlan0 ?
How to active again eth0, or ho to create the logical eth0?
I'm running a dual boot Ubuntu 10.04/Backtrack 4 (Ubuntu 8.10) system. I can get internet in the BT4 side but not in the Lucid side. In Lucid I can ping my router, and the network manager says I'm good to go, but I can't get to any web sites. It all started when I tried to put my laptop on another network by mimicking the settings of a computer I had just unplugged from the network. MAC address and all.
ifconfig eth0:
Code:
eth0 Link encap:Ethernet HWaddr 00:1f:16:ba:4c:8c inet addr:10.136.9.147 Bcast:10.136.9.159 Mask:255.255.255.240 inet6 addr: fe80::21f:16ff:feba:4c8c/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Since I installed ubuntu 10.04 I dont see my eth0 card in System->Preferences->Network _connections. Everything works fine but it puzzles me. In ifconfig iI just see the eth0, networking seems to be working fine, but it keeps puzzling me. Adding theinterface is no solution: add it and it doesnt show again
i have just installed f12, recently i was facing a problem of a package named rp-pppoe missing,, but then i installed it by using rpm command,..but now still im not able connect to internet.. as im using adsl connection with modem connected via RJ45,,. im trying to create new xdsl connection by manually putting IP,subnetmask,gateway, dns1,dns2... but still the connection always remian inactive...and i couldn't find any way to activate it...
I recently setup a new SUSE box for the purposes of acting as an ftp/sftp server. It's currently setup to run ProFTPD 1.3.3.rc3 and mod_sftp/0.9.7. The server has two internal network interfaces eth0 and eth1. eth0 is purely for internal use to accept ftp and ssh. eth1 is outward facing and receives connections from the WAN via SFTP over port 22. The problem I am facing is that after half hour to an hour eth1 stops accepting connections whenever there is no SSH connection present on eth0. I can't figure out why this is happening.
ProFTPD is setup as follows: SocketBindTight directive is on, default server and port are commented out.
[code]...
When the external interface is unreachable the proftpd and proftpd-sftp logs show no record of any connection attempt. I have noticed however if I leave eth0 down eth1 stays contactable without problem. Can anyone give me some pointers on what I can check to find out why this may be happening.
i install kernel rpm after i boot that kernel network not working kernel name : kernel-rt-trace-2.6.24.7-132.el5.centos.i686 [URL] error "Bringing up interface eth0: Device eth0 has different MAC address than expected, ignoring."
I've looked today on my logs /var/log/message and I find device eth0 entered promiscuous mode I don't remember putting eth0 in promiscuous mode I'm connected to the net thru a router how do i turn that off ?
I'm nearly at the end of creating a shell script that automates changing network settings by prompting the user for desired settings, then applying them.
In the course of my development, I created temporary copies of /etc/sysconfig/network-scripts/ifcfg-eth0 (/etc/sysconfig/network-scripts/ifcfg-eth0_tmp1, for example) so as to not alter the original file. Little did I know that on boot the system would attempt to load each of these kinds of files and associate it with an ethernet connection, in this case eth0.
So..... now there are multiple copies in the /etc/sysconfig/network-scripts diretory that essentially have the same settings. They are..
Now when the system boots, it attempts to load them all. The boot doesn't appear to complete, and I can't ping, login, or otherwise access the system through convention routes (putty, etc.).
The easy solution would be to delete the tmp files and reboot. Now, how do I do that without being able to log in to the server. It's a VM by the way, if that makes a difference.
I have a hardware device with two ethernet ports, eth0 and eth1 running Centos 5. Basically my goal is to forward packets from eth0->eth1 and eth1->eth0 as well as get a copy of these packets for analysis. If I set IP routing to do the forwarding then I won't get a copy of the packets for analysis.
i have a root-server and a vserver.the vserver should provide services if the root-server is not reachable. i would like to configure heartbeat. its runnung on the root, but on the vserver i get an error: if i set the following in the ha.cf:
Ubuntu server 9.10. I have configured my network connection using GUI Network connection. It worked fine with DHCP, but when I assigned a fixed IP eth0 has disappeared. How can I restore it?
Since I have a new internetaccount, 2 days ago, I have a problem on my server [Fedora Core 8]. I use it as a router.
eth0 is for the internet. eth1 is for my LAN.
But since my new internetaccount my server uses eth1 for the internet. This is a line from my syslog:
Code: NetworkManager: <info> Policy set 'System eth1' (eth1) as default for routing and DNS. I killed the NetworkManager daemon and now it works but this must not be the way to do it? Where do I tell my server that I use eth0 for routing and DNS?
I tried for two days to install ubuntu server to my computer from a cd. Whenever I tried burning to a CD-RW (using two programs at highest and lowest speeds), my cd always said it had corrupt files. So I setup a virtualbox harddisk that was setup tonuse my slave harddisk and installed ubuntu server in virtualbox successfully. Now when I boot my server, it won't connect to my network. Long story short, I have taken lo out of my interfaces and tried resetting my dhcp ip address by releasing and renewing it using dhclient. I have realized that eth0 doesn't exist (it shows up in windows). I think that all I need to do is add eth0 to ubuntu...
I have set up a nis slave server on Fedora 14. It was set up on a laptop so that the user can log in when he is at home (no NFS, local home dir). However, whenever the eth0 is disconnected, ypbind fails.
I have tried the same setup on a RHEL 4 (configured it as a slave server) against the same master nis as on the Fedora 14. Disabling eth0 on it however does not fail ypbind.
this should be trivial for all you big sysadmin guys My box is a firewall/gateway. ETH0 is on the Internet-side, and is fully auto-configured (DHCP client) from my ISP. ETH1 is on the LAN-side, has DHCPD enabled, and I route the traffic to/from the Internet via iptables (NATting, of course). Everything works pretty good, except for the DNS-server assignment via DHCP: how can I configure dhcpd.conf to assign the SAME dns-server I receive from my provider on ETH0 to all my PC on ETH1?
I had a server that I use for Radius DNS and Trying to put DHCP on it I have My pool in it seems right. I have 2 adresses aliased one being a helper IP that the router will send the request to. When I try to start the dhcp server I get the following.
Mar 31 14:33:11 rad2 dhcpd: No subnet declaration for eth0 (76.164.173.2). Mar 31 14:33:11 rad2 dhcpd: ** Ignoring requests on eth0. If this is not what Mar 31 14:33:11 rad2 dhcpd: you want, please write a subnet declaration Mar 31 14:33:11 rad2 dhcpd: in your dhcpd.conf file for the network segment Mar 31 14:33:11 rad2 dhcpd: to which interface eth0 is attached. **
I connect to a VPN using openVPN. Now, after the connection is established, all my traffic goes through tun0. My LAN gateway is 10.100.98.4... So, for apps to use my direct internet connnection I did
sudo route add default gw 10.100.98.4
But, I cant use tun0 now. I know this because
curl --interface tun0 google.com
doesnt give me anything.. How do I go about using both connections simultaneously. How can I achieve that?
ROUTING TABLES:-
Without VPN running:-
Destination Gateway Genmask Flags Metric Ref Use Iface 10.100.98.0 * 255.255.255.0 U 1 0 0 eth0 default 10.100.98.4 0.0.0.0 UG 0 0 0 eth0
I added an init script numbered just before bind9 starts, which needs to see the ipv6 link-local address on eth0. Sometimes this address is not configured, yet. In all cases it eventually is configured.
I am unable to find any script that is configuring the ipv6 link-local address (which is in part based on the MAC address). Does anyone know if there is some script or program that is supposed to be doing this, or is it an internal kernel function?
One workaround I am considering is making this init script go into a loop around sleep 1 to keep checking for the ipv6 address. But I'm concerned this might cause some problems. Any suggestions? I don't want to let it move on to start bind9 until the configuration this script does (more ipv6 addresses) is done.
This is on Ubuntu 9.10 server (for which there is not a prefix choice).
I have a computer under Linux with several network cards, for example: eth0, eth1, eth2, eth3. Is there some way to run any downloader, like aria2 or wget only through one interface, for example eth0?
Main problem: for some reason I can't use iptables