linux网络故障解决方法

1、linux本机能否访问httpd服务,判断linux本机能否访问www服务
wget http://localhost/index.html

2、远程客户端能否连接上,判断linux端口是否可以访问
telnet 192.168.10.10 80
能否远程telnet  登陆80端口,对应的服务器ip地址是192.168.10.10

3、IPTABLES 防火墙是否有限制

允许任何IP脚本:
 
iptables -I INPUT -p TCP --dport 80 -j ACCEPT


禁止任何IP脚本:

    iptables -I INPUT -p TCP --dport 80 -j DROP


限制特定IP脚本:

    iptables -I INPUT -s 192.168.1.18 -p TCP --dport 80 -j DROP 


关键/开启防火墙命令centos7.0 用的命令跟之前版本不一致

# systemctl stop firewalld
# systemctl disable firewalld

# iptables-service

# touch /etc/sysconfig/iptables
# systemctl start iptables
# systemctl enable iptables

# touch /etc/sysconfig/ip6tables
# systemctl start ip6tables
# systemctl enable ip6table


可以参考 redhat 官网:

Chapter 3. The Apache HTTP Server

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Managing_Confined_Services/chap-Managing_Confined_Services-The_Apache_HTTP_Server.html


网卡的几个关键位置

1、

vim /etc/udev/rules.d/70-persistent-net.rules

2、

cd  /etc/sysconfig/network-scripts 
vim ifcfg-eth0  


        




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值