centos7 没有iptables服务 file or directory? 用secureCRT登录centos?

cenetos7 采用systemd来管理服务
centos7 没有采用传统的iptables服务, 而是采用的firewalld 服务, 以及firewall-cmd 命令;

也可以采用传统的 iptables.service服务来管理防火墙, 但是要安装 iptables-service 程序软件.

如果没有安装iptabes-service "软件/程序" , 将没有iptables命令, 自然就会提示 没有...文件或目录了....

yum install iptables-service;
systemctl start|stop|restart|save|status iptalbes.service

原始的firewalld管理是:

service firewalld start.

centos7 系统默认的防火墙服务叫 firewalld 或: firewalld.service.

关于iptables-services?

  1. 安装的程序包, 叫 iptables-services, 注意是iptables, 不是iptable单数; 是services不是 service单数, 可能是因为这个包即包含ipv4, 也包含ipv6.

  2. 安装后 并没iptables-service(s)命令存在, 可能只是在 /usr/lib/systemd/system/iptables.servce这个服务 (服务实际上也是一个文件/目录 是可执行的程序文件等....)

  3. 启动iptables.service, 你可以使用 systemmctl 也可以还是使用老的, service service_name start/status 等, 系统会自动重定向 redirecting to...systemctl....

  1. 防火墙用 iptables 管理的, 很明确, 可以清楚地看到filter表 中的 三个 链的规则情况:

========================================================
从主机上访问虚拟机上的httpd主页, 开始时访问不上, 根据"四部曲"排错思路, 临时禁用iptables 就可以访问了:

telnet中文乱码: 通过设置: $LANG="zh_CN.GB18030"

默认情况下, centos7是安装并启用了ssh服务的, 而且用securecrt是很好地 连接登录到centos的;
但是, 在默认情况下, 是没有安装 没有开启telnet(server)服务的, 如果要用telnet登录连接的话, 就要安装 telnet-server程序包:

centos的yum 不能连接到 镜像或163 sohu等服务器,, 通常/多半是由于, 原来采用的是dhcp, 后来改成了static, 于是,没有了dns, 所以无法解析域名....

安装了telnet-server后, 如何启动telnet服务器?

这时候, 实际上是启动的 telnet.socket.
还需要安装 xinetd 程序包, 因为telnet是由 xinetd来管理的.
用service 或systemctl 分别启动/ 或将 enable:: telnet.socket 和xinetd.service (默认的就是服务)

用telnet登录比较麻烦, 使用shh2登录比较容易而且 还更安全:

可以直接定义静态地址, 的网关:用 GATEWAY=192.168.1.1就好了!

ssh2 没有目录和文件 的颜色区别?

这个不是ssh的事, 即使你用telnet登录也是这样,
应该是, 设置secureCRT的终端模拟设置, 可以设置, emulation->terminal: linux或xterm. 背景选traditional

posted @ 2016-09-03 16:47  noitanym  阅读(7685)  评论(0编辑  收藏  举报