搭建了Jenkins服务,本机可以访问
curl 127.0.0.1:8080
<html><head><meta http-equiv=’refresh’ content=’1;url=/login?from=%2F’/><script>window.location.replace(‘/login?from=%2F’);</script></head><body style=’background-color:white; color:white;’>
Authentication required
<!–
You are authenticated as: anonymous
Groups that you are in:
Permission you need to have (but didn’t): hudson.model.Hudson.Read
… which is implied by: hudson.security.Permission.GenericRead
… which is implied by: hudson.model.Hudson.Administer
–>
</body></html>
局域网机器不能访问
curl: (7) Failed connect to xxx:8080; No route to host
查看iptables,端口已开.
iptables -L -n -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT udp — virbr0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:53
0 0 ACCEPT tcp — virbr0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:53
0 0 ACCEPT udp — virbr0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:67
0 0 ACCEPT tcp — virbr0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:67
487K 219M ACCEPT all — * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
13 960 ACCEPT all — lo * 0.0.0.0/0 0.0.0.0/0
200K 25M INPUT_direct all — * * 0.0.0.0/0 0.0.0.0/0
200K 25M INPUT_ZONES_SOURCE all — * * 0.0.0.0/0 0.0.0.0/0
200K 25M INPUT_ZONES all — * * 0.0.0.0/0 0.0.0.0/0
0 0 DROP all — * * 0.0.0.0/0 0.0.0.0/0 ctstate INVALID
200K 25M REJECT all — * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
0 0 ACCEPT tcp — * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
0 0 ACCEPT tcp — * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8080
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all — * virbr0 0.0.0.0/0 192.168.122.0/24 ctstate RELATED,ESTABLISHED
0 0 ACCEPT all — virbr0 * 192.168.122.0/24 0.0.0.0/0
0 0 ACCEPT all — virbr0 virbr0 0.0.0.0/0 0.0.0.0/0
0 0 REJECT all — * virbr0 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
0 0 REJECT all — virbr0 * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
0 0 ACCEPT all — * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
0 0 ACCEPT all — lo * 0.0.0.0/0 0.0.0.0/0
0 0 FORWARD_direct all — * * 0.0.0.0/0 0.0.0.0/0
0 0 FORWARD_IN_ZONES_SOURCE all — * * 0.0.0.0/0 0.0.0.0/0
0 0 FORWARD_IN_ZONES all — * * 0.0.0.0/0 0.0.0.0/0
0 0 FORWARD_OUT_ZONES_SOURCE all — * * 0.0.0.0/0 0.0.0.0/0
0 0 FORWARD_OUT_ZONES all — * * 0.0.0.0/0 0.0.0.0/0
0 0 DROP all — * * 0.0.0.0/0 0.0.0.0/0 ctstate INVALID
0 0 REJECT all — * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT 12629 packets, 18M bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT udp — * virbr0 0.0.0.0/0 0.0.0.0/0 udp dpt:68
458K 507M OUTPUT_direct all — * * 0.0.0.0/0 0.0.0.0/0
4 1740 ACCEPT tcp — * * 0.0.0.0/0 0.0.0.0/0 tcp spt:8080
执行iptables -F 清除所有防火墙规则后就可以,具体原因不清楚,希望知道了之后更新.