As of May 31, 2023, we have updated our Code of Conduct.
21 votes

How to add local forward setting to my ssh config file?

I think, you have differently defined command and config. In command, you are using localhost and in config, IP address (12.34.56.78). This should works for you: Host myhost User myuser ...
dorinand's user avatar
  • 309
18 votes

Why does my hostname appear with the address 127.0.1.1 rather than 127.0.0.1 in /etc/hosts?

I was curious myself, and i didnt like any of the other answer because they didnt seem to answer what i was looking for atleast. The Answer: Looking back at this doc it almost appears as if Thomas was ...
Brian Thomas's user avatar
14 votes

iptables: what does "--src-type LOCAL" mean exactly?

I believe the answer that addr-type LOCAL means loopback is wrong, because it is only a partial answer and is extremely misleading. LOCAL means ANY IP assigned on one of the interfaces of the host, ...
Lethargos's user avatar
  • 445
14 votes

Can't SSH into a Vagrant Virtual Machine

It's old but as there is no answer, I'll provide one. Command: vagrant ssh Is the equivalent of ssh vagrant@localhost -p 2222 -i .vagrant/machines/default/virtualbox/private_key This is default ...
stefwhite's user avatar
  • 141
11 votes

can localhost be spoofed?

Yes. Surprisingly, it is possible to spoof a loopback source address. Obviously you won't get any replies, so your spoofed packet also needs to include an exploit. Also it will be stopped at a ...
sourcejedi's user avatar
  • 1,080
10 votes

IIS refuses connection to localhost and 127.0.0.1

I've had the same problem, but localhost worked because ::1 address was listening as well as network ip. This command helped me netsh http add iplisten 127.0.0.1
Uladzimir Shchur's user avatar
9 votes

Configure Dovecot to only let localhost connect via imap

The listen = addr:port config is deprecated in newer versions of dovecot. The new way of doing things is with service { inet_listener imap { address = ... } }. On my system it's in /etc/dovecot/conf....
mgalgs's user avatar
  • 345
9 votes
Accepted

What exactly is going on when I go to localhost:8080 in my web browser? (Apache Tomcat)

What exactly is going on when I direct my web browser to go to localhost:8080? You are causing your web browser to ask your operating system to resolve the hostname localhost. Operating systems will ...
Keith Reynolds's user avatar
8 votes
Accepted

localhost as computer name

It's probably not going to break much of anything on your local machine, assuming no Windows domain nor DHCP is involved. However, the identifier 'localhost' specifically and always is defined to ...
atk's user avatar
  • 197
8 votes
Accepted

How to add local forward setting to my ssh config file?

The syntax of the ssh_config file was correct - so the error had to be somewhere else. The command line which worked was: ssh 12.34.56.78 -L 8888:localhost:8000 but in the LocalForward directive, you ...
Martin's user avatar
  • 2,149
6 votes

Why does my hostname appear with the address 127.0.1.1 rather than 127.0.0.1 in /etc/hosts?

I read several answers around, and I'm frankly a bit confused. I first tried to understand what is canonical hostname here. What I can say is that @cmroanirgo is right in saying that on my Ubuntu ...
Riccardo Manfrin's user avatar
6 votes

DNAT from localhost (127.0.0.1)

This works for me, routing traffic from localhost:8081 to 172.17.0.1:80, where 172.17.0.1 is a veth behind the bridge interface named docker0. sysctl -w net.ipv4.conf.docker0.route_localnet=1 ...
pwaller's user avatar
  • 161
5 votes

MySQL cannot connect via "localhost", only 127.0.0.1

For me, OSX's builtin php is configured to use a different unix-socket than homebrew's mysql. Thus it can't connect via localhost which utilizes that socket. I fixed it with a quick hack by ...
user2755841's user avatar
5 votes

nginx redirecting to localhost

You'll need the above answer plus server_name_in_redirect off; Then clear your browser cache
AndrewSmiley's user avatar
5 votes

DNAT from localhost (127.0.0.1)

You will have to run the following three commands to make it work: iptables -t nat -A OUTPUT -p tcp -d 127.0.0.1 --dport 4242 -j DNAT --to 11.22.33.44:5353 sysctl -w net.ipv4.conf.eth0.route_localnet=...
stephenjy's user avatar
5 votes
Accepted

how to find proces which is pinging localhost

The command sudo lsof -n |grep "st=07" seem to work. To test it, I ran ping as shown below on one terminal to generate ICMP packets arul@cheetah:~$ ping localhost PING localhost (127.0.0.1) 56(84) ...
Arul Selvan's user avatar
  • 1,428
5 votes
Accepted

Port 80: connection refused. How to fix on Mac OSX?

To make sure port 80 is open for TCP on all interfaces, I added pass in proto tcp from any to any port 80 to /etc/pf.conf. Reloading pfctl didn't quite do the trick, but a reboot did. Now, the port ...
Tench's user avatar
  • 351
5 votes
Accepted

Will it detriment my security if I allow all connections from localhost through iptables?

Remember that localhost (127.0.0.1) is the loopback interface on the system. If someone can snoop traffic on that interface, they are already on your system so you have worse problems to deal with.
user9517's user avatar
  • 115k
5 votes
Accepted

Conflict with Chrome and RFC2606

What you are doing is wrong. localhost is a hostname pointing to 127.0.0.1 not a domain, so adding hosts to it as if it is a domain but pointing somewhere else is logically incorrect. You may be ...
JamesRyan's user avatar
  • 8,186
5 votes

Difference between 127.0.0.1 and 127.0.1.1?

The other answer quotes an obsolete bogus reference which doesn't match the link and doesn't look like it will be corrected. Here is the correct quote from today's Debian Reference Manual: 5.1.1. ...
A.B's user avatar
  • 10.4k
4 votes

Can't SSH into a Vagrant Virtual Machine

Windows / Vagrant / Ubuntu This is what worked for me and you can quickly figure out if this will work by running this on the ssh client. ssh vagrant@127.0.0.1 -p 2222 -v The -v will put it in ...
mrjamiebowman's user avatar
4 votes

localhost as computer name

I'm pretty sure that's OK to use. I don't have a test computer at the moment to test it...you can easily do so. But to prove my answer...here's the actual list of reserved words according to: http://...
TheCleaner's user avatar
  • 32.6k
4 votes

/etc/hosts file being ignored

I just wasted an hour because a copy'n'paste update to my /etc/hosts had a tab instead of a blank separating the ip and the name. So another thing worth checking if an entry is being ignored for ...
xverges's user avatar
  • 143
4 votes
Accepted

FH_HELO_ALMOST_IP: How to fix HELO for sent e-mails (CentOS 7)

This happens because your host has a name that somewhat resembles an IP address, for instance 62-210-247-11.rev.poneytelecom.eu To fix the problem, you need to do two things: Give your host a proper ...
Michael Hampton's user avatar
4 votes
Accepted

Ubuntu Apache Server 503 Error: disabled connection for (localhost)

Your understanding on apache configuration is a bit backwards and upside-down. I'd suggest reading the documentation on any new software you're trying to configure. :) In short, this part of your ...
EEAA's user avatar
  • 109k
4 votes
Accepted

Is it important to use localhost/127.0.0.1 rather than machine's own IP address?

Using an identical hosts file is fine and will have no performance impact, the traffic stays local if you connect to H1 from H1. However, if you connect to localhost/127.0.0.1, the source IP will be ...
Sven's user avatar
  • 98.4k
4 votes

How do I force localhost resolution to be 127.0.0.1 instead of ::1?

Remove IPv6, as your legacy application don't seem to support it. Check the download there, it's a quick try easy to do: How to disable IPv6 or its components in Windows How to do it manually: ...
yagmoth555's user avatar
  • 16.7k
4 votes
Accepted

How to access 127.0.0.2 3 etc to other computer/network over LAN?

Any packets with an address in the 127.0.0.0/8 range can never appear on any network anywhere. Traffic sent to an address in that range will immediately loop back inside the host. Start with RFC 1700, ...
Ron Maupin's user avatar
  • 3,223
4 votes
Accepted

localhost domain bypasses /etc/hosts file

You can't. The localhost is already reserved as a Special-Use Domain Name (RFC 6761, 6.3). The domain localhost. and any names falling within .localhost. are special in the following ways: - - Name ...
Esa Jokinen's user avatar
  • 45.2k
4 votes
Accepted

Nginx static file configuration for CenotOS 7 Minimal Installation

Your system has SELinux enabled. By default SELinux does not allow the web server to read files in users' home directories. The directories enabled for web serving are /var/www (where system packages ...
Michael Hampton's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible