Ubuntu Networking :: Change Hosts File By Network Connection?
May 11, 2010
Is it possible to have different /etc/hosts file for different network connections without having to go in and change it every time? The why: I have dyndns and port forwarding to get to my desktop. My laptop is sometimes on the same network, and sometimes not. Also, sometimes the dyndns doesn't update properly, or the outside connection is down, but I want to get to my desktop (and I'm too lazy to walk up the stairs). I'd like to be able to keep one set of bookmarks, ssh command aliases, etc. that would always get to it the fastest and most reliable way possible.
View 1 Replies
ADVERTISEMENT
Aug 4, 2009
I need a script but i am not good at programming soWhat script have to do:- Every 1 minute is checking if ip address is available (ping)- if ip answers nothing happens- if ip does not answers: * file /etc/hosts is changed by one stored in /home/user/hosts* notification by xterm to restart some programIf finally ip answers file /etc/hosts is changed by one stored in /home/user2/hosts
View 6 Replies
View Related
Apr 25, 2011
I want to know why when i change the file hosts, fill it with due parameters and reboot the system, the latter unexpectedly change ?
View 2 Replies
View Related
May 24, 2011
I have some settings within hosts file of my Windows Vista. It helps me to bypass some limitation and get online better. I would like to migrate some settings to openSUSE 11.4.Is there anyone who knows how can I tune my openSUSE?FYI, setting of hosts file is lines of <IP Address> <Spaces OR Tabs> <URL OR Alias>
View 4 Replies
View Related
Jun 8, 2010
When I converted to OpenSUSE 11.2, and went through YaST HTTP Server Configuration, creating my virtual hosts under the Hosts tab, YaST combinedm all int ile,"/etc/apache2/vhosts.d/ip-based_vhosts.conf".I did google and read, [URL]for further assistance.I'd like each virtual host to have its own file under vhosts.d, and wondering why YaST did not do that.The file /etc/apache2/httpd.conf laid out the file structure, and all vhosts.d/*.conf files are included.Is there a way to tell YaST to create separate files for each vhost, or does the user have to manually do it?
View 5 Replies
View Related
May 2, 2011
I'm trying to use ssh-keyscan to get some known_host file population going on, but I have a ton of hosts I want to scan, all with multiple aliases in /etc/hosts. Is there a way to use my current /etc/hosts file to do an ssh-keyscan instead of making a special list of hosts that (from what I've read) ssh-keyscan needs?
View 2 Replies
View Related
Jul 26, 2011
I am using centOS 5.0. After I change from DHCP to static IP address, I cannot ping hosts on the same subnet. The error message says destination host unreachable. Before I made the changes I was able to ping and now even I change it back to DHCP I still cannot ping with the same destination host unreachable message. The centOS is running on VMware on a Windows host.
ifconfig shows
eth0 Link encap:Ethernet HWaddr 00:0C29:A1:9A:10
inet addr: 192.168.0.202 Bcast:192.168.0.255 Mask: 255.255.255.0
inet6 addr ......
After pinging 192.168.0.106 (106 is on and other host can ping it), arp -a shows ? (192.168.0.106) at <incomplete> on eth0 I tried different ways by disabling the firewall and and disabling SE protection. No Luck.
View 13 Replies
View Related
Jan 26, 2011
Probably an easy (which means stoopid) question...I am trying to reroute a website using my hosts file so that it matches my servers certificate file for testing without effect dns and the live site.When I went to edit my /etc/hosts file it is non-existent. I have, I am assuming in it's place, hosts.allow and hosts.deny. Can anyone explain why I do not have a hosts file?
View 1 Replies
View Related
May 6, 2010
I have a small office network with windows machines and a Linux Internet access server (CentOS 5.4). For Internet access I use masquerade, so everione can access every Internet service.
I periodicali have quite big traffic from one of the hosts, but I can't figure out which one is that?
Is there any linux command which will show me the bytes/packets (or any useful infos) going to specific hosts?
View 9 Replies
View Related
Oct 1, 2010
I Own a netcafe and I want to limit the netspeed for some of the users on the network because some of them maybe use torrent or other ways to eat the bandwidth and the net became so slow for other users.
My task is a way to limit the net speed for some users on the network, I tried a mikrotik RouterOS but it look like a miss to install I wanted an easier way than this, I use linux or windows or any OS to make this task done please help me to do it !!
View 4 Replies
View Related
Aug 17, 2011
Well, as many proxy applications, GNOME Network Proxy Preferences only allow to ignore hosts. What I want to do is exactly the opposite. I only want to use the proxy for few sites. Is it possible to define only the allowed hosts in any way?
PS: I know FoxyProxy add-on for Firefox does this, but 1)I don't use Firefox and 2)I want the proxy settings system wide not only for browser.
View 9 Replies
View Related
May 24, 2011
The facts are as follows:
1. I have at work a regular LAN with many PCs, each with a DNS-registered public IP. Therefore I am able to address each of these PCs by their fully-qualified names and, for instance, initiate ssh sessions to any of these computers just by typing "ssh <name_of_machine>" from a terminal.
2. Within the aforementioned LAN I have just created a private network with some clients, which access the LAN through a router (a D-link DIR-825). We have created this private network for many reasons, but most importantly because we need to guarantee that the hosts in this network will remain networked among them even if the LAN goes down for any reason (which unfortunately happens often). But we still need to have access to the hosts in the private network from the LAN.
3. I am able to define port forwarding rules in the router in order to access certain services on the private network's clients. For example. I am able to access (by ssh) hosts "H1" and "H2" on the private network from a client on the LAN by defining rules for forwarding ports "P1" and "P2" on the router's public IP to TCP port 22 on the private IPs of "H1" and "H2", respectively. Then I would access each of these hosts from the LAN by using:
>ssh -p P1 [ip.address.of.router] (for accessing H1) and >ssh -p P2 [ip.address.of.router] (for accessing H2)
4. The problem with the port forwarding approach is that it is not easily scalable. For instance, If I wanted to enable ssh access to each host in the private network, I would have to define a port forwarding rule for each machine, and then REMEMBER all these port rules when initiating a ssh session from the LAN in order to point to the right host. And the problem gets worse when considering more services in addition to ssh.
5. The ideal solution would be to be have a means for addressing each host in the private network individually, in much the same way in which I address the hosts in the LAN (which have DNS-registered names). For instance, in order to access hosts H1 and H2 as in the previous example, i would like to be able to just type
>ssh [name_of_host_H1] (for accessing H1) and >ssh [name_of_host_H2] (for accessing H2)
The bottom line:
I guess I can say that what I need is some kind of combined DNS-ing and routing that allows me to communicate with the hosts in the private network from outside of it in a transparent way.
The question is: what are any possible solutions for accomplishing this? I have searched the web and found stuff about things like VPNs, reverse-proxies and NAT servers, but I really can't understand if any of these could serve to solve my problem (BTW, isn't my router doing some sort of NAT-ing already? could I just add some DNS-ing in some way?)
View 3 Replies
View Related
Jun 27, 2011
Problem:Your company network has internal only hosts / websites with names that end in .local, e.g.Your freshly installed Ubuntu machine works fine on the network, has internet access, etc. but cannot connect to these particular systems.Testing DNS with tools like dig / nslookup works fine, but normal name resolution with ping / telnet / browsers does not work.Solution:1. Open a terminal window2. Enter the command sudo nano /etc/nsswitch.conf3. Change the following line:hosts: files mdns4_minimal [notfound=RETURN] dns mdns4to this:hosts: files dns4. Press Ctrl-X, Y, Enter to saveExplanation:Ubuntu ships configured to do name lookups for self-configuring networks, based on the AppleTalk / mDNS / Bonjour protocol. In the configuration shipped for the resolver, this protocol is considered the final aurhority for the ".local" top level domain, and DNS will not be checked. The above configuration change eliminates this and restricts lookups to (a) /etc/hosts file, followed by (b) DNS
View 1 Replies
View Related
Feb 28, 2011
I often manually add a troublesome domain (e.g., advertisements, fake virus alerts, etc.) to my /etc/hosts file on Ubuntu 10.04 Lucid; but the effect isn't immediate.My hosts file is already fifteen thousand lines long (having combined all the hosts files I could find on the net, including the MVP one); but I still, almost daily, find a new irritant to add to my /etc/hosts file.My problem is I do not understand WHEN the /etc/hosts file is next read after a change.I've been rebooting to make sure the hosts is re-read; but there must be a simpler way.My question:
- WHEN is the /etc/hosts file reconsidered in Ubuntu?
- Is there a way to have the /etc/hosts file re-read sooner?
View 9 Replies
View Related
Jan 31, 2010
Instructions say "Add hostname for the NIC card into /etc/hosts file" do I touch or mkdir it in?
View 11 Replies
View Related
Jul 9, 2010
I need to setup an Ubuntu Server to handle backups over the network (probably rsync over ssh). That server will then transfer the backup data offsite over a secondary external data line.How can I configure the ethernet interfaces to handle such a scenario?
View 1 Replies
View Related
Feb 3, 2010
I run a local apache server, that has some virtual hosts running. Now I want to be able to locally connect to these virtual hosts, but when I try this, it puts www and .com behind the url and says it can't find it. On Windows I know the equivalent, editing the hosts file. Is there something similar in linux?
View 1 Replies
View Related
Jan 24, 2010
Its a case of ".... wireless network connection active but still not internet connection .."I am using WEP - 128 key ... Works when I connect directly using ethernet cable ... but not wireless (pci and wireless router)
ubuadmin@ubucomputer:~$ ifconfig
wlan0 Link encap:Ethernet HWaddr 00:06:25:12:83:3b
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::206:25ff:fe12:833b/64 Scope:Link[code].....
View 5 Replies
View Related
Mar 2, 2011
I have installed qemu/kvm and created a Bridged network connection which works just fine(Windows 7 VM won't work in NAT mode.)
But when I try to use NetworkManager it says that I have no network connection because the network isn't managed, (I set the settings in ifcfg-br0 and ifcfg-eth0 to be managed)
The real problem is that now I can't use my VPN connections (I have many) in NetworkManager.
Is there a way to have both of these pieces of functionality?
I am using FC14
View 5 Replies
View Related
Aug 29, 2010
I just installed open Suse 11.3, and I cannot SSH my school. Upon further investigation I could not even ping any machines outside my local area network. Ironically I could nmap machines outside my local area network.
View 4 Replies
View Related
Aug 21, 2011
since a few weeks I have a problem connecting to other hosts when I'm using another wireless network, which has a different DNS IP than I have in my network. I have to change /etc/resolv.conf to change the nameserver. Can NetworkManager control the nameserver? If yes, how?
View 3 Replies
View Related
Apr 3, 2010
I installed the driver for my network card. iwconfig and ifconfig are all responsive to connecting to the network, I'm given an access point address. Then, I try to connect to a website and no dice. ping www.google.com yields no result. What gives?
View 2 Replies
View Related
Jan 29, 2011
I have a Broadcom Corporation NetXtreme BCM5721 network card on my server at work.Everything works fine for a few weeks, then randomly the network connection on the server will stop working. After it stops working, I will try to reconnect with the network manager, it shows a wired connection available, it shows the "connection in progress"animation, then the "connection disabled" icon.
I uninstalled the network manager and used manual configuration, but do you think the network manager was the issue? I can't have the server disconnecting randomly every few weeks with no way to know what the real problem is. Was there an issue with the network manager with 10.04?
View 4 Replies
View Related
Oct 12, 2009
I am losing network bandwidth and I am quite frankly I am not sure why, I don't have allot memory 495.6Mib
But I clean my PC every few days "BleachBit"
I have read some where on the magazine Network receiving suppose to be higher. so how can I fix this issue please i am having allot problems, u use cable from Comcast
I am not quite sure what Information you might need from me to give.
I use Ubuntu 8.04 LTS
View 1 Replies
View Related
Feb 9, 2010
I have 2 computer: 1 computer install ubuntu v9.10, in this computer already installed openssh-server and openssh-client, and 1 computer install windows. In computer with windows , i used putty connect to computer with ubuntu, but i can't connect. I don't understand what's error.
In the Putty , i configured:
IP : IP address of computer Ubuntu.
Port 22
Connection Type SSH
This is error: "Network Error: Software caused connection abort"
In computer with windows, i can ping computer with ubuntu and in computer with ubuntu i can ping computer with windows.
View 5 Replies
View Related
May 14, 2010
I am trying to Setup citrix ICA client 9 on Ubuntu 9.04 Server. I installed it very easily and I am not getting any lib error also. But when I try to connect to the citrix server, it fails with a pop up saying "Error in Network Connection Network or Dialup connection may be preventing ......" This is driving me crazy from 3 days. My project is to check the feasiblity of a Linux desktop
View 1 Replies
View Related
Aug 8, 2011
I am trying to upgrade my system from 7.04 to a current version. I now face the known problem that my machine tries to download everything from archives.ubuntu.com although it has all been moved to old-releases."If you have this problem, you could change your /etc/host file to point archive.ubuntu.com to old-releases. Do this by running host old-releases.
ubuntu.com | grep address | awk '{print $NF" archive.ubuntu.com"}' | sudo tee -a /etc/hosts."
I have tried typing that information into the command line, with no success. I opened the /etc/hosts file in emacs (using sudo) but did not see an obvious place to impliment the fix.
View 1 Replies
View Related
Oct 31, 2010
I have the "Work Offline" problem: when I boot up, the icon on the toolbar tells me I have "No network connection". This is not quite true, since I can access the first page of any website - only subsequent pages are inaccessible. I get a message saying that Firefox is offline. However, when I uncheck "Work Offline" in the File menu, it makes no difference to this behavior.
The problem is on my Ubuntu Dell desktop, which is connected to the internet with cable broadband via a D-Link router (wired connection). It has worked fine up till now. I use Ubuntu 10.04 and Firefox 3.6.11. I am writing this on my Ubuntu Dell laptop which is wired to the same router, so I assume the problem is not the router. I have tried various strategies suggested in threads on these forums, including editing about:config, changing "allow" to "deny" in some lines of /etc/dbus-1/system.d/NetworkManager.conf and changing from Automatic (DHCP) to Automatic (DHCP) Addresses only, but no luck so far. The contents of ifconfig are:
eth0
Link encap:Ethernet HWaddr 001:aa0:91:a7:51
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets: 0 errors: 0 dropped: 0 overruns: 0 carrier: 0
collisons: 0 txqueulen: 1000
RX bytes: 0 (0.0 B) TX bytes: 0 (0.0 B)
[Code]...
If I comment out "auto eth0" as well, it makes no difference. If I uncomment both lines ("auto eth0" and "iface eth0 inet dhcp") then I lose the internet connection altogether.
View 4 Replies
View Related
May 29, 2010
I have set up SSH and redirected the ssh server to listen on another port other than 22 for a bit of added security.
Now in hosts.deny I have:
ALL : ALL
In hosts.allow I have:
SSH : ip_address_of_client
I can no longer connect. I get the message: ssh_exchange_identification: Connection closed by remote host.
When I change hosts.allow to read:
ALL : ip_address_of_client
I can successfully connect the server.
However, I only want to allow SSH access in hosts.allow. What is the correct syntax?
I have tried and failed with each one of these:
SSH : ip_address:port_number
SSH2 : ipaddress
sshfwd-portnumber : ip_address_of_client
View 2 Replies
View Related
Jun 26, 2011
I have just managed to setup a small server were I run rtorrent through och VPN tunnel pptp based. When I start up my server without starting the tunnel it looks like this.
[Code]...
I guess that something happen with the VPN connection, assigned a new ip number maybe and that that made the change.
View 3 Replies
View Related