在linux关闭防火墙可以这样:
1. 重启系统生效
开启: chkconfig iptables on
关闭: chkconfig iptables off
2. 即时生效,重启后失效
开启: service iptables start
关闭: service iptables stop
首先对方服务器需要有提供ssh服务;
然后ssh登录到对方服务器,执行关闭防火墙指令即可;
可以简化指令内容为:
ssh user_name@server_ip "service iptables stop"
注意到的是,第一次登陆时,会有一个yes/no的校验提醒,还会提示输入相应用户的密码;
ssh ip:端口
输入账号、密码
然后根据版本不同,操作方式分为:
RedHat/CentOS 6.5以及以下版本:
#service iptables stop
RedHat/CentOS 7:
#systemctl stop firewalld.service