Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [hosts]

An /etc/ file that lists the hosts on a network (/etc/hosts ).

0
votes
0answers
29 views

About resolving hostname and user transfer

all the things of my previous user A directory have been transferred to another user B directory in the same server. I even have rebuilt the mpich. If I run the previous compiled exe or the new ...
-1
votes
0answers
23 views

About /etc/hosts and /etc/hostname [duplicate]

I am new in Linux networking. I want to ask about /etc/hosts and /etc/hostname. What is /etc/hosts and /etc/hostname? What is the purpose of these files? What application in Linux uses these files? ...
0
votes
0answers
22 views

Unable to access certain websites

I am unable to access certain websites on Ubuntu 16.04. I get the error message "Firefox can’t establish a connection to the server at www.reddit.com." while trying to access Reddit for example. I ...
0
votes
1answer
44 views

PC (Ubuntu 18.04.01 Server Edition) and laptop (VMware Ubuntu 18.04.01 Server Edition) linked via cable: ping works only one-way

In order to understand how to eventually make a beowulf cluster, I tried, following this reading Building a simple Beowulf cluster with Ubuntu to link my PC with Ubuntu 18.04.01 Server Edition with my ...
0
votes
0answers
18 views

How do I set up my host configuration for GNS3?

I have GNS3 and am just starting out trying to learn a bit about networking. I did the tutorial here: https://docs.gns3.com/1d1huu6z9-wWGD_ipTSQZqy2mpaxiqzymu-YQo6at_Jg/index.html and have the routers ...
0
votes
1answer
75 views

/etc/hosts file wiping edits after suspending or rebooting

18.04 with latest updates. I am trying to modify my /etc/hosts file so I can access my local server via its hostname. I make the change with sudo nano /etc/hosts, and it sticks fine for the ...
1
vote
1answer
146 views

Cannot access local server with IP address while localhost and 127.0.0.1 can

I am trying to let other computers to access my local server but I tried myself locally that I cannot access it locally even myself. Several things you should know: My target Visit my server via ...
0
votes
0answers
35 views

KVM guest host communication Ubuntu virtual server

I have tried a few solutions so far but cannot get this working: I have a couple virtual servers running on my client machine. I seem to be able to connect the guests to the host or the guests to ...
1
vote
0answers
73 views

Exim: use /etc/hosts to resolve domain names

I have just installed exim4, and my /etc/hosts file looks like this: 127.0.0.1 localhost 127.0.1.1 mycomputer 192.168.100.5 rpi.mydomain.com However, when I run exim -bt john@rpi.mydomain....
0
votes
0answers
27 views

Hosting for multiple users

I'm trying to create a system for multiple users to login and host their own webpage (just basic html and php so possible db nothing fancy). Obviously the easiest way would be to create a user, limit ...
-1
votes
1answer
43 views

Local domain is Pinging but not opening in the browser

I have setup local domain for example like this mydomain.test Whenever I ping this domain I receive the following 64 bytes from localhost (127.0.0.1): icmp_seq=87 ttl=64 time=0.028 ms 64 bytes from ...
2
votes
0answers
623 views

accessing localhost in virtualbox (ubuntu)

How can I access my virtual host like http://copywriters.localhost inside my Windows 10 VirtualBox? I already set this: In VM Host File: 10.0.2.2 localhost 10.0.2.2 copywriters.localhost In my ...
1
vote
1answer
146 views

Can't block YouTube using host file in Ubuntu 16.04

I followed this steps to block Facebook, Quora and YouTube. sudo cp /etc/hosts /etc/hosts.old sudo gedit /etc/hosts In the host file, I typed : 127.0.1.1 www.quora.com 127.0.1.1 www.youtube.com ...
0
votes
0answers
48 views

Remmina can't ssh to machine by hostname

I am using ubuntu 18 with remmina to manage my ssh sessions. I can connect to my machine (on local network) using: remmina with ip regular ssh with ip regular ssh with hostname When trying to ...
0
votes
2answers
124 views

ubuntu unable to resolve host

I'm working on ubuntu 14.04. I cant login to my pc as a root user.I tried different ways and i cant still the issue. If i give sudo command the response is like > ubuntu@ubuntu72:~$ sudo su sudo: ...
6
votes
1answer
126 views

Torque: Unauthorized Request

Following this guide: https://jabriffa.wordpress.com/2015/02/11/installing-torquepbs-job-scheduler-on-ubuntu-14-04-lts/ I installed TORQUE on Ubuntu 16-04-lts (he claims the process works the same ...
0
votes
2answers
3k views

Ubuntu 18.04 not recognizing hostnames from router

I previously had Xubuntu 16.04 installed, and it did recognize the hostnames set by my router (Tomato). For example, I have a computer with the name mate on the network with a static IP of 192.168.2....
1
vote
0answers
27 views

How to filter out selected records from /etc/hosts file from terminal prompts for ssh command

I have a problem with hints for the ssh command. When I press the tab key, the terminal displays all records from the /etc/host file in prompts. I use add-ons to block spam and advertisements in my ...
1
vote
1answer
951 views

/etc/hosts is ignored on 16.04 and no previous solution helps

Entries in my /etc/hosts file are being ignored: $ cat /etc/hosts 127.0.0.1 localhost 127.0.0.1 google.com $ ping google.com PING google.com (216.58.213.142) 56(84) bytes of data. 64 bytes from ...
1
vote
0answers
191 views

Ubuntu 17.10 - Nginx Hosts not working

I'm using Ubuntu 17.10 and have installed nginx. I already made the change on php.ini cgi.path_info=0 and have added this on etc/hosts 127.0.0.1 test.app Then I saved and restarted nginx, but when ...
0
votes
0answers
403 views

/etc/hosts changes ignored

I want to add entries to my hosts file so I can access some local vagrant VMs for development. I have a near-new install of Ubuntu 16.04 LTS. There is a /etc/hosts file but changes I make to it are ...
2
votes
1answer
399 views

Unable to block Linkedin.com

I needed a break from wasting time on LinkedIn and Twitter, so Iappended following to /etc/hosts file on Ubuntu 16.04: 127.0.0.1 twitter.com 127.0.0.1 linkedin.com This blocked Twitter but not ...
0
votes
0answers
65 views

Ubuntu server access without hosts file entry

I have a website hosted on a CentOS box (httpd service) as: http://mycompany.the.global Which I am able to access without hosts file entry in my local machine. On the home page of: http://mycompany....
2
votes
1answer
5k views

Missing /etc/hosts file – How can I create a new hosts file? [duplicate]

I have googled and searched Ask Ubuntu on this, but got no relevant answers. I have no hosts file in /etc, I cannot find a hosts file in search, I am talking about the system hosts file not lampp/etc. ...
-1
votes
1answer
330 views

in a server ubuntu 16.04 pointing all sub-domain to domain

site1.conf enter image description here all domain point to one site ServerName dev.site1.com DocumentRoot /var/www/html/site1 site2.conf ServerName dev.site2.com DocumentRoot /var/...
2
votes
1answer
461 views

Firefox is Ignoring Ubutnu hosts File

I am running Ubuntu 16.04 and I am using HTTP proxy to connect to the INTERNET in my university. I have edited my hosts file as below 127.0.0.1 localhost 127.0.1.1 user-PE62-7RD 10.105.8....
0
votes
1answer
320 views

Editing /etc/hosts causes Apache server block to be missed

In order to fix some email (SPF) issues, I changed my Ubuntu VPS hostname to its FQDN in /etc/hosts and /etc/hostname. However, now, when I hit the URL in a browser I get a 404 from Apache instead of ...
0
votes
1answer
2k views

Is it possible to use multiple IP addresses for the same host name in a linux hosts file?

The scenario is I have a machine that can be accessed both locally (when I am in the same network as the machine) and publicly (when I am on any external network). I want my hosts file to look ...
0
votes
1answer
268 views

How to change Host (IP address) and port number to connect to wifi internet in Xubuntu 16.04?

I explain my situation: I downloaded from google play store NetShare app to make my smartphone as WiFi extender, it works with no problems, BUT I need to change the host name (IP address) and port ...
0
votes
0answers
848 views

Blocking youtube on Ubuntu using etc/hosts [duplicate]

I want to block Youtube using the hosts file. I managed to do this with Facebook and Instagram but with Youtube it is not working. Here is my hosts file: 127.0.0.1 localhost 127.0.1.1 goncalo-...
1
vote
1answer
44 views

Forward a certain website to a different IP locally

So what I'm trying to do, is when someone wants to visit a site like www.illegalsite.com I want it to redirect back to google, or a set IP address. I dont have a DNS server or anything. Adding ...
0
votes
1answer
95 views

How to insert a DNS into /etc/hosts through a bash script?

I have a bash script runmydocker.sh that should grab the DNS string sent by the developer, when running he runmydocker.sh and create a new DNS inside the /etc/hosts dynamically and point to the docker ...
1
vote
1answer
48 views

How to access cloud host by secondary IP? [closed]

Version of Ubuntu is 14.04 and host provider 1and1.com. I have configured the host with two public IPs and following is the configuration of my /etc/network/interfaces file: # This file describes the ...
3
votes
2answers
1k views

Google Cloud Compute keeps changing my /etc/hosts file after restart

I have been playing around with 3 google cloud compute instances using webmin/virtualmin (web hosting and email), Vestacp (hosting only), and ISPconfig (hosting only) control panels. The ISPConfig ...
0
votes
0answers
380 views

/etc/hosts file add edit and deletes using root user OR admin users

i have 60+ plus workstation running ubuntu 14.04 and 16.04 is there any tools or command that can i automatically add edit or delete hosts file in location /etc/hosts for example: pc-1 pc-2 pc-3 ...
1
vote
1answer
2k views

Why my /etc/hosts file is empty in Ubuntu?

In Ubuntu my /etc/hosts file is empty. It happened suddenly, i did not modify it and don't think any other program also modified it. How can this happen ? Now moreover I am not able to edit the /etc/...
0
votes
2answers
7k views

Hosts file with port?

I know you can't put a port in /etc/hosts, so how can I achieve the equivalent of: 127.0.0.1 https://website.com:4433 For WordPress, I need CURL to go to 127.0.0.1 on port 4433. As it's ...
0
votes
0answers
605 views

Ping LAN computer with hostname

I have setup my LAN and there are a couple of computers connected through a router. Every computer gets their IP address automatically by DHCP running in the router. Each computer has their own unique ...
0
votes
0answers
316 views

Ubuntu How to properly configure Sendmail - 550 Verification Failed

I tried to install sendmail function, but did not work when did a echo test. Can anyone advice? sudo nano /etc/mail/local-host-names domain-name.com machine_name.domain-name.com sudo nano /etc/...
3
votes
1answer
116 views

How do I automate adding all entries in `/etc/hosts` to `~/.ssh/config` file?

Is there a way to convert the format of an /etc/hosts file with "hostaddress" "hostname" into a .ssh/config file with Host myhostname Hostname hostaddress I have a large number of hosts and ...
0
votes
1answer
490 views

Running a local website without localhost

I'm developing some frontend Javascript code for the first time on Ubuntu. I have the code (written over the last year by others) for the site installed and ready to run. But on this Ubuntu machine ...
0
votes
0answers
445 views

How to redirect HTTP call on a port to another port on local env?

Problematic I would like to call http://myapp.dev in my web browser and "redirect" this call to http://myapp.dev:6547 or http://127.0.0.1:6547, like a proxy would do. This way, I could have an ...
10
votes
1answer
2k views

How to set up localhost to redirect a website

I am asking this question from an awkward situation. As you may know or not know, Google is blocked in China. A discouraging consequence (at least to me) is that visiting Stack Exchange sites, like ...
0
votes
1answer
423 views

How to access a web application with a domain in a local network

Under my network, I have setup an Ubuntu Server 16.04, which I have deployed some web applications which are accessible in the browser from http://192.168.0.4/myapplication. What, I want is to ...
1
vote
3answers
705 views

what is the difference between the hosts and hosts.allow files?

what is the difference between the hosts and hosts.allow files? From what I have read it seems like both files are for adding IP address allowing network access. Below are my hosts and hosts.allow ...
0
votes
1answer
91 views

Restricting access to hosts file/websites?

To keep myself productive, I'd like to block access to certain websites no matter how little willpower I have. One thing I've done on Windows is password-lock my modified hosts file and kept the ...
6
votes
2answers
3k views

I want to change the host name - is it enough to edit the /etc/hosts file? [duplicate]

Short version Can I just edit the /etc/hosts file, meaning can I login as user@<hostname I wish to change> without unintentionally breaking something? Would this be enough or is there something ...
8
votes
1answer
10k views

What are the default settings for 'etc/hosts' and 'etc/hostname'?

I'm using Ubuntu 16.04. I recently started learning DevOps and got a bit crazy with my 'etc/hosts' and 'etc/hostname' files. In my frantic attempt to spin up a couple of servers from my local machine ...
1
vote
0answers
138 views

Set domain on listening IP ubuntu

So I have working application on ubuntu 16.10 server which listen to :3030 port. Now its reachable and working when I visit it via http: http://*.*.*.*:3030 and I want to make it working on my domain -...
1
vote
0answers
241 views

all files necessary to change hostname (FQDN)?

Per an older answer, these are all the files necessary to change the hostname? /etc/host.conf /etc/hosts /etc/hostname /etc/sysctl.conf for Ubuntu 16.04 server LTS on Amazon EC2