700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > linux系统ip访问53端口 linux – 使用公共IP地址无法访问本地端口

linux系统ip访问53端口 linux – 使用公共IP地址无法访问本地端口

时间:2023-11-04 00:35:03

相关推荐

linux系统ip访问53端口 linux  – 使用公共IP地址无法访问本地端口

我有一个linux服务器,它有公共IP和私有IP.因此,当我使用公共IP登录时,终端直接显示私有IP.

例:

$ssh root@55.27.XX.XX

root's password:

root@10.1.4.20:~$hostname -I

10.1.4.20

root@10.1.4.20:~$wget -qO- /plain ; echo

55.27.xx.xx

现在,我安装了Nginx,我可以使用默认的nginx页面加载55.27.xx.xx.但是,当我用端口85安装phpmyadmin时,它不允许我从公共IP访问该页面.

如果我使用卷曲10.1.4.20:85,我得到200 OK响应.但卷曲55.27.xx.xx:85,我得到超时.

与netcat命令相同:

root@10.1.4.20:~$nc -vz localhost 85

nc: connect to localhost port 85 (tcp) failed: Connection refused

Connection to localhost 85 port [tcp/*] succeeded!

root@10.1.4.20:~$nc -vz 55.27.xx.xx 85

nc: connectx to 55.27.xx.xx port 85 (tcp) failed: Operation timed out

可能服务器可能在一些路由器后面:

root@10.1.4.20:~$ip addr show

1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default

link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

inet 127.0.0.1/8 scope host lo

valid_lft forever preferred_lft forever

inet6 ::1/128 scope host

valid_lft forever preferred_lft forever

2: eth0: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

link/ether 52:55:00:tt:a6:76 brd ff:ff:ff:ff:ff:ff

inet 10.1.4.20/16 brd 10.4.255.255 scope global eth0

valid_lft forever preferred_lft forever

inet6 dddd::xxxx:ff:4534/64 scope link

valid_lft forever preferred_lft forever

我没有做任何端口转发步骤.我看到iptables -L的空白输出如下:

Chain INPUT (policy ACCEPT)

target prot opt source destination

Chain FORWARD (policy ACCEPT)

target prot opt source destination

Chain OUTPUT (policy ACCEPT)

target prot opt source destination

从服务器,我无法ping

ping

PING (xx.xx.xx.xx) 56(84) bytes of data.

^C

--- ping statistics ---

3 packets transmitted, 0 received, 100% packet loss, time 2000ms

请建议从公共IP地址使用端口85访问phpmyadmin需要做什么.

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。