Ubuntu :: Autostart A Script AFTER NICs Are Enabled?
Jan 10, 2011
I have a script that I need to run on boot which requires my network interfaces to be already setup when it runs. On an old P4 test machine (all machines in question are running server 10.10) I have to add "sleep 1" in front of my script to get this to work. My application is boot-speed sensitive but I'm alright with this.
What I'm not alright with, and don't understand, is when I move the script to my Atom D510 platform I have to bump up to "sleep 9" to get it to work reliably but even as low as "sleep 5" works on occasion. I have been using both /etc/init.d and an @reboot command inside /etc/crontab with similar results.I don't understand why I have to sleep so much longer on the Atom (everything else aside they both boot in about the same amount of time) and I don't understand why the duration I have to sleep on the Atom is not stable.Is there any way I can get a more fine grained control of when my script executes (ie as soon as possible after the network interfaces are started)?
I have installed Ubuntu 64 10.04 server. I have two nics and have set them up to both be static with their own IP with the correct gateway, network, broadcast, subnet and dns-nameserver. When I have both enabled, I can ping local pc's but I can't ping Internet sites like Google nor can I get out to the Internet with apt-get or Lynx.
If I disable one, then I am able to get out to the Internet. All my configs look good, and it does not matter which one I disable, just so long as there is only one NIC on, everything is good.
Ok so I'm gonna try and explain this easily. I installed 11.04 32bit on an older HP P4 machine. Boots up and goes to classic desktop.. But networking looks like a wifi devices rather than a wired connection. I installed another NIC rather than the onboard but had the same result.. I also tried yet another PCI NIC and a USB NIC with the same result. I also tried to set my connection to manual and give myself a static IP, but had no such luck.
I know my internet connection works because I'm on another machine typing this to you all.. All the NICs also work in W7 on the dualboot setup I did.
I had to reinstall my DMZ webserver the other day. Now I cannot figure out for the life of me figure out why Apache refuses to listen on eth1 it will only listen on eth0. I have it setup so that it listens with * I'm not specifying a particular IP for it to listen on. When I do specify it still doesn't work.
PC Client (192.168.2.100) --> Router (192.168.2.1) --> DSLAM (on our internal network) --> PPPOE Server (192.168.9.1) on Linux Ubuntu 8.04 on interface card eth2.
On the same Linux Ubuntu Machine on interface card eth1 (static IP 192.168.5.100), I have an Asterisk SIP server plugged into it. SIP Server = 192.168.5.101 (static)
I need the PC client (192.168.2.100) to register via SIP soft phone to register on the SIP server (192.168.5.101). From the PC client I can ping as far as the eth1 interface (192.168.5.100)...but cannot ping the SIP Server (.101).
From the SIP server (192.156.5.101)...I can ping 192.168.5.100, I can ping 169.254.5.228 (Eth2:avahi), but not sure what that is. I cannot ping the pppoe default gateway (192.168.9.1), which I think you cannot anyway.
No firewalls are running. My IPtables I cleaned out totally. I think it might be as simple as a route add, but I really have no clue. Tried building a virtual bridge using brctl LINUX betweeh eth1 and eth2, but that made things worse (could not ping anything after that)
Route table:
Destination Gateway Genmask Flags Metric Ref Use Iface
I do not understand why I cannot ping 192.168.5.100, but not .101 I have opened the Asterisk Sip Server to accept connections from 192.168.2.0, 192.168.5.0, and 192.168.9.0 subnets.
I have 2 hard drives, one holds windows (160gb), another has three partitions, 15gb for ubuntu 10.04, 5gb for swap, and the remaining 480gb formatted as ntfs for files..
The 480gb space is drive D:, my files are located there and i point the apps to get their files from drive D:. For example, "My Music" folder is in drive D:, and so I tell SongBird to grab the music files from that directory.
It's not a big problem, but whenever I restart ubuntu, drive D: does not automatically open so SongBird initially cannot locate the files. What I want to happen is that when ubuntu starts, drive D: is already loaded, so that the applications can grab the files they need from that drive automatically without me having to manually open drive D: everytime ubuntu starts.
I have attached a diagram to show the layout, but basically I have a server that has 2 nics. I use NIC1 for the server and its services. Im using VirtualBox to run VMs and want to use NIC2 for the VMs exclusively and I want the VMs on a different network completely from the host.Ive tried setting up NIC2 on the other network but I end up with networking problems on network1. Also I cant figure out how to tell VirtualBox to bind to the host NIC2.
I have 2 x PCs and a NAS. Both PCs have 2x NICS. PC connectivity to Internet is via an ADSL router. Current config: Thus far (by choice) I've used static IPs in the 192.168.168.x range for my internal network, connecting all PCs and NAS via a jumbo frame enabled gigabit switch. This has facilitated moving data between the PCs and the NAS at high-speed. As both PCs also required Internet access from time to time, both are also connected to the ADSL router using the 2nd NIC and using subnet 192.168.1.x. I'm sure some of you are shaking your heads by now, but it works well and has been entirely hassle free.
However, I've an app running on the NAS that I'm keen to get Internet connected also. As my existing network devices are not using DHCP I figured the simplest method would be to change my ADSL router configuration such that it is in the same 192.168.168.x subnet, change its DHCP server settings to serve IPs in the same subnet (but in a restricted range I know won't cause any conflicts with the static IPs) and problem solved. On changing the ADSL router confiruration with all machines already booted up and configured as described above, everything worked. All devices could see one another, and access the Internet. On later rebooting the system this no longer works
- Internet access is fine but PCs don't see one another or the NAS. If I disconnect the ADSL Router from the PCs then all devices see one another again.
- Does having 2x NICS on a single device each assigned unique IPs in the same subnet create an issue and can it be overcome? I'd like to overcome it because making one of my PCs the gateway forces me to have it on anytime another device needs access.
- If I'm forced to use Internet connection sharing with one PC on the network connected to the router, how do I best configure this?
- One of the things I need to retain is gigabit connectivity between the PCs and PCs and the NAS (currently achieved by 192.168.168.x subnet being linked via gigabit switch).
My brother has a Ubuntu server attached to a LAN with Windows PCs. I set up an openVPN tun service on the server, let's call this VPN1, so that I can connect remotely from my Ubuntu desktop. The server has one NIC and the LAN has a router that is the gateway to the internet.
My brother would like to remotely access his windows network when roaming with his Windows laptop.
Therefore, I would like to set up a second VPN service, this time tap, that is bridged with his LAN. Let's call this VPN2.
The LAN subnet is 192.168.1.0/24. The internet gateway is 192.168.1.1
The NIC has a fixed IP set by the router of 192.168.1.150
How do I set up VPN2 so as not to trash VPN1? That is, if I bridge eth0 with tap0 how will that impact VPN1's tun0 that is using eth0? Do I need a separate NIC for the VPN2 bridge?
I am considering moving to a software (ebox/pfSense/Zeroshell etc) based router.
It fits well to have 1 NIC connecting to your modem & the other to your switch & network. It seems to make sense it is more secure, but is it?
If I assign the 1 NIC in my router 2 IPs, a subnet for the modem and a subnet for the LAN, how is the different?
I can't think exactly what it is. I am no network guru and probably missing something down at a lower networking level, but for a home router, does 1 or 2 NICs make any difference?
I have a pc with debian 6 (without GUI) installed on it and want to use it as server at home. It has 2 ethernet nics. Now i want to configure the routing process. Searched internet for a long time found something but couldn't get it work.
My server has 2 network cards. I have SLES 10 SP2 installed on this server. I had configured Ethernet bonding on this machine using 2 NICs. Now I want to assign 2 different IP's to 2 different NICs. I am able to do this without any issue using yast. ifconfig command shows that eth0 has 192.168.1.10 and eth1 has 192.168.1.12. Rest all networking details are same (netmask, gateway, DNS)
Strange thing: When I unplug only eth0, (eth1 is plugged in correctly) I am not able to ping any IP. If I unplug only eth1, (eth0 is plugged in) I am able to ping both IP's.
I have an Asus R1F laptop with a build in wireless card. I also have 2 USB dongles that we used to use old desktop machines. All of the cards work fine in Ubuntu. I'm running Ubuntu 10.10, 2.6.35-22-generic-pae.
The problem is that I have really bad signal on my side of the house and the connection is dropped quite often. I've tried just connecting on the devices at the same time, they all connect fine but nothing actually works. I read about bonding interface cards on this blog and that would solve all my problems - if a usb dongle could act as a backup for when the normal connection is dropped and while it is reconnecting.
I tried what was written and also did some Googling, but every way that I try seems to work fine until 2 wireless devices are bonded. When that happens they both disconnect and reconnect like crazy. This happens both with and without network manager running.
Build in card[wlan0]: Intel PRO/Wireless 3945ABG USB[wlan1]: Cisco LinkSys Compact Wireless-G USB Adapter USB[wlan2]: Realtek RTL 818713 WLAN Adapter I load the module: Code: modprobe bonding mode=1 miimon=100 downdelay=200 updelay=200
I have an Ubuntu server box with multiple NICs. I'd like to specify that all traffic bound for a certain IP range goes through one NIC, and everything else goes through the other. Does anyone know how to do that? I'm not a total newbie, but I'm also not a linux guru (but usually can google my way to a solution...usually).
ETA: Source and destination IP for routing.We have 1 NIC with a public IP, all public IP's should talk to it.Another NIC with a private IP, all private traffic should talk to this.In practice, I have some devices on a different subnet of the public IP range we have that will only talk to the private IP.
I'm running Ubuntu 11.04 and I'm really new to linux. My problem is that whenever I try to browse a site I notice the website loads very slowly because it takes a long time to do lookups. I installed Ubuntu with an onboard NIC and later switched to a PCI NIC (Dlink DGE-530T). Although I disabled the onboard NIC in the BIOS, it doesn't help. Could this conflict in configuration be a problem? My download rates are fine, its just lookups that take really long ( upto ~ 10 seconds). I know the PCI network card is fine because when I jump to Windows 7, lookups are normal again (~ 300ms). At first I thought about installing the sk98lin drivers for the PCI NIC but I saw a couple of places where people have mentioned that the skge driver that comes along with the kernel is better.
I have tried a system wide as well as Firefox disable of IPv6. Here is my /etc/udev/rules.d/70-persistent-net.rules Code: # PCI device 0x1186:0x4b01 (skge) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:24:01:14:eb:39", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" # PCI device 0x10de:0x0373 (forcedeth) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1e:8c:3e:19:ed", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1" The interface I want to use according to the listing above is the one with the MAC - 00:24:01:14:eb:39.
I tried removing one of the entries in the file above and rebooting but it still didn't work. Here is a look at my /etc/network/interfaces Code: auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 192.168.1.10 gateway 192.168.1.1 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255
I have coldfusion installed on a guest ubuntu server in virtualbox, it is configured with apache2 & everything works great. But how do i get Coldfusion to autostart when i boot up the guest ubuntuserver ?
How do I get processes to run as root during startup? I have a random script and a package which both need to run as root in the background, but I can't find a way to do this automatically.
I have a java application that is in this path: java -jar /home/jbo10/.stuff/run.jar
If I type that command the gui comes up and it's ready to run. I want this program to autostart with ubuntu, so I went into gnome-session-properties and put that command in there.
But it's not starting. I'm not sure what I'm doing wrong or if there's another way to autostart programs?
how do i clear autostart? i've unchecked everything i don't need in "startup applications" but still after reboot i get everything running. i cleared ~./config/autostart but after reboot there appear all the default startup applicatons. What should i do?and is there a way to remove volume indicator from indicator menu?
I am using an Ubuntu VPS(Virtual private server) with SSH access. I run my applications(mangos-realmd & mangos-worldd) in SSH terminal and they start up fine. But when I close the SSH terminal they close! but I want it so that when I close my SSH terminal that those programs remain running, and also want them to start up each time I reboot my system. I am found out with rc.local this is now solved or what-not
I just installed a very basic kde with the kde window manager. but the network applet does not autostart, neither does it connect when started from terminal.
I have Ubuntu 10.04 with Gnome. Whenever I put in a blank CD/DVD an icon on the desktop appears named "Blank CD/DVD" and a window appears asking me what I want to do with it.How do I disable the window and the icon from the desktop?
When i log into to a non root(user) mode, i am always greeted by a small terminal window before the desktop starts up. Also, after desktop starts a new window opens which displays the contents of my windows desktop.
I am unable to stop this from happening. I am running Ubuntu 10.10(32 bit) along with Windows 7(64 bit) on different partitions.