我需要启用 telnet(不,我不能使用 ssh,我也不想讨论为什么我必须使用 telnet),我在 /etc/hosts 中有 127.0.0.1 localhost.localdomain localhost。我已经安装了 telnet-server,chkconfigd 并启用了 xinetd。SElinux 被禁用。但是每次我尝试 telnet 到主机时,我都会收到“getaddrinfo: localhost Name or service not known”。有任何想法吗?
我是第一次设置ufw。在 OpenVZ VPN 上使用 Ubuntu 10.04 LTS 并具有以下规则:
sudo ufw allow 22/tcp
sudo ufw allow 25/tcp
sudo ufw allow 53
sudo ufw allow 80
sudo ufw allow 443
sudo ufw default deny
Run Code Online (Sandbox Code Playgroud)
SSH 和其他一切正常,我可以访问 nginx 上的静态内容。但是,当我访问 PHP 页面时,需要很长时间才能提供 504 网关超时页面。我正在使用 php5-fpm
我尝试了许多规则,包括以下内容:
allow from 127.0.0.1 to 127.0.0.1 port 9000
allow from 127.0.0.1 port 9000 to 127.0.0.1 port 9000
allow 9000
allow from 127.0.0.1 to 127.0.0.1
Run Code Online (Sandbox Code Playgroud)
但他们都没有解决问题。一旦我关闭防火墙,一切正常。Php5-fpm 肯定正在运行并使用端口 9000。
任何帮助表示赞赏,谢谢!如果我解决了,我会回帖。
附加配置:http : //pastebin.com/3e6rHRti
这个很奇怪,因为我没有任何错误消息。
我有一个非常基本的默认文件:
server {
#listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
root /var/www;
index index.html index.htm index.php;
# Make site accessible from http://localhost/
server_name localhost;
access_log /var/log/nginx/default.access_log;
error_log /var/log/nginx/default.error_log warn;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to index.html
try_files $uri $uri/ /index.html;
}
location /doc {
root /usr/share;
autoindex on;
allow 127.0.0.1;
deny all;
} …Run Code Online (Sandbox Code Playgroud) 我正在尝试在我的 RHEL6.4 vm 上设置一个 Apache 服务器,但由于dnsmasq某些原因无法识别主机名,因此无法设置:
nslookup rhel64.example.com
Server: xxx.xxx.xx.1
Address: xxx.xxx.xx.1#53
server can't find rhel64.exmple.com: NXDOMAIN
Run Code Online (Sandbox Code Playgroud)
/etc/hosts:
xxx.x.x.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
Run Code Online (Sandbox Code Playgroud)
/etc/resolv.conf:
; generated by /sbin/dhclient-script
search novalocal example.com
nameserver xxx.xxx.xx.1
Run Code Online (Sandbox Code Playgroud)
如果您需要查看任何内容来解决我的问题,请告诉我。我不能使用不同的 DNS 服务器。
寻找一种dnsmasq在不更改 DNS 服务器的情况下解析主机名的方法。
我无法在我的一台机器上连接到 localhost 和 http://127.0.0.1。但是http://machinename有效。
这会导致 Windows 令牌应用程序无法发出令牌,因为它无法连接。
这显示在事件日志中:
Request for security token failed with exception:
System.ServiceModel.EndpointNotFoundException: Could not connect to
http:// localhost : 32843/SecurityTokenServiceApplication/securitytoken.svc/actas.
TCP error code 10061: No connection could be made because the target machine actively
refused it 127.0.0.1:32843
Run Code Online (Sandbox Code Playgroud)
我可以 ping 到本地主机:
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Run Code Online (Sandbox Code Playgroud)
同样对于 127.0.0.1
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 …Run Code Online (Sandbox Code Playgroud) 我有大量的测试项目在我的 localhost apache 服务器中进行。我的本地主机上安装了 SSL。叫我怪胎(我不介意,因为这完全没有意义),但我希望我的本地主机的 SSL 是带有绿色条的 EV SSL。那么如何为我的本地主机制作一个自签名的 EV/Green Bar SSL 证书呢?我怎样才能教我的 FireFox 识别它?提前致谢!
我刚刚遇到一个服务器,它不响应诸如ping localhost或之类的事情mysql -h localhost- 我相信这是因为 localhost 未在 hosts 文件中定义。
在我使用localhost过的几乎每台机器上,hosts 文件中都有一个条目。有什么好的理由不定义它——比如可能的安全问题?或者这是默认情况下可能应该配置的东西,也许只是缺少?
我目前正在设置一个网络服务器,仅供个人和测试使用。现在我正在尝试运行一些Python应用程序,但是当我启动它们时,它们在127.0.0.1:5000上运行。我是否可以转发此内容以使其可以在其他地方访问?
在我当前的配置下,
iptables将阻止每个入站连接,即使来自localhost. 在某些情况下,我需要localhost连接到自身。如果我创建一个规则,允许来自 的所有入站连接localhost,这会损害我服务器的安全性吗?例如,攻击者是否可以以任何方式滥用此防火墙规则?
我运行的是 Windows 10 x64,并且我有一个旧应用程序无法正常localhost转换::1为127.0.0.1.
如何强制 Windows 10 将 localhost 解析为127.0.0.1?
我已经编辑了主机文件,添加了以下行,但它不起作用( ping 仍然显示::1):
127.0.0.1 localhost
Run Code Online (Sandbox Code Playgroud)