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?
安装的程序包, 叫 iptables-services, 注意是iptables, 不是iptable单数; 是services不是 service单数, 可能是因为这个包即包含ipv4, 也包含ipv6.

- 安装后 并没iptables-service(s)命令存在, 可能只是在 /usr/lib/systemd/system/iptables.servce这个服务 (服务实际上也是一个文件/目录 是可执行的程序文件等....)
启动iptables.service, 你可以使用 systemmctl 也可以还是使用老的, service service_name start/status 等, 系统会自动重定向 redirecting to...systemctl....


- 防火墙用 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

centos7 没有iptables服务 file or directory? 用secureCRT登录centos?的更多相关文章
- phpmyadmin登录提示mysqli_real_connect(): (HY000/2002): No such file or directory和mysql8登录失败的问题
网上的解决方法有很多,但都无法解决我的问题,最后在stackoverflow上找到解决方法,原文地址:https://stackoverflow.com/questions/41881123/mysq ...
- 解决CentOS7关闭/开启防火墙出现Unit iptables.service failed to load: No such file or directory.
CentOS7中执行 service iptables start/stop 会报错Failed to start iptables.service: Unit iptables.service fa ...
- /etc/rc.d/init.d/iptables: No such file or directory 错误原因
注:本文转载自cnblogs:一天学点的文章</etc/rc.d/init.d/iptables: No such file or directory 错误原因> RedHat Enter ...
- CentOS 7.x关闭/开启防火墙出现Unit iptables.service failed to load: No such file or directory问题解决
一直用CentOS 6.x,今天用CentOS7.3版本时,防火墙配置后执行service iptables start出现”Failed to restart iptables.service: U ...
- iptables报错:Couldn't load target `accept':/lib64/iptables/libipt_accept.so: cannot open shared object file: No such file or directory
语句:iptables -A INPUT -s 134.192.204.235 -p TCP --dport 11211 -j accept 报错:Couldn't load target `acce ...
- centos7数据库连接使用127.0.0.1报permission denied,使用localhost报No such file or directory
安装lamp环境后,测试数据库连接. 当host使用127.0.0.1时,报错:(HY000/2002): Permission denied. 把host换成localhost后,又报错:SQLST ...
- Failed to execute operation: No such file or directory(systemctl enable iptables.service)
在保存Iptables配置时:systemctl enable iptables.service 出现错误: Failed to execute operation: No such file or ...
- Centos7 安装Redis,报错[adlist.o] Error jemalloc/jemalloc.h: No such file or directory
redis官网 https://redis.io/download 安装 $ wget http://download.redis.io/releases/redis-5.0.4.tar.gz $ t ...
- Centos7解压.tar.bz2提示tar (child): bzip2: Cannot exec: No such file or directory解决方法
Centos7解压.tar.bz2提示tar (child): bzip2: Cannot exec: No such file or directory解决方法 原因是因为该centos没有bzip ...
随机推荐
- CentOS使用yum源中自带的rpm包安装LAMP环境
CentOS使用yum源中自带的rpm包安装LAMP环境.这是Linux下安装LAMP的环境一种最基本最简便的方式.新手可以从容安装使用. 1. 安装基础包(可选安装)yum install -y w ...
- 用javascript插入样式
一.用javascript插入<style>样式 有时候我们需要利用js来动态生成页面上style标签中的css代码,方法很直接,就是直接创建一个style元素,然后设置style元素里面 ...
- JSP转译成Servlet详细过程
很多人都会认为JSP的执行性能会和Servlet相差很多,其实执行性能上的差别只在第一次的执行.因为JSP在执行第一次后,会被编译成 Servlet的类文件,即.class,当再重复调用执行时,就直接 ...
- python 聊天室
server端程序 # -*- coding: utf-8 -*- #!/usr/bin/python """ """ import soc ...
- 在 Azure HDInsight 中安装和使用 Spark
Spark本身用Scala语言编写,运行于Java虚拟机(JVM).只要在安装了Java 6以上版本的便携式计算机或者集群上都可以运行spark.如果您想使用Python API需要安装Python解 ...
- Hibernate一对多关联
一对多双向关联关系:(Dept/Emp的案例) 既可以根据在查找部门时根据部门去找该部门下的所有员工,又能在检索员工时获取某个员工所属的部门. 步骤如下: 1.构建实体类(部门实体类加set员工集合) ...
- NOIP复习赛20161117
题目链接:http://files.cnblogs.com/files/candy99/%E9%A2%98%E7%9B%AE1117.pdf A n个等比数列求和公式(都感觉数列忘光了) %1e9+7 ...
- COGS 265线段覆盖[线段树]
265. 线段覆盖 ★★☆ 输入文件:xdfg.in 输出文件:xdfg.out 简单对比时间限制:2 s 内存限制:20 MB [问题描述] 有一根长度为 L 的白色条状物.有两种操 ...
- [No000084]C# 使用Log4Net(1)-快速建立一个demo
1.下载Log4Net: http://logging.apache.org/log4net/download_log4net.cgi 2.新建一个WinForm程序,取名Log4NetDemo 3. ...
- 快速掌握iOS API的一个小技巧
快速掌握iOS API的一个小技巧 周银辉 iOS SDK和Developer Library中提供了各个类以及函数的帮助文档,这很棒,但要想了解整个库的大体结构(比如UIKit下有哪些类,他们的继承 ...