centos7.3下的一个iptables配置

author author     2022-09-15     253

关键词:

centos7.3默认使用的防火墙应该是firewall,而不是iptables。而我们如果想要再服务器上使用iptables防火墙,在配置防火墙之前,我们需要先关闭firewall,安装iptables。


当前环境:

[[email protected] ~]# cat /etc/redhat-release 
CentOS Linux release 7.3.1611 (Core) 
[[email protected] ~]# uname -r
3.10.0-514.el7.x86_64
[[email protected] ~]#


查看firewall状态:

[[email protected] ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)
[[email protected] ~]#


如果要关闭firewall防火墙,则执行 

[[email protected] ~]#systemctl stop firewalld

如果要设置开机不启动,则执行

[[email protected] ~]# systemctl disable firewalld
[[email protected] ~]#


接下来安装iptables服务

[[email protected] ~]# yum -y install iptables-services


查看iptables状态,执行

[[email protected] ~]# systemctl status iptables.service
● iptables.service - IPv4 firewall with iptables
   Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
[[email protected] ~]#


设置开机启动

[[email protected] ~]# systemctl enable iptables.service
Created symlink from /etc/systemd/system/basic.target.wants/iptables.service to /usr/lib/systemd/system/iptables.service.
[[email protected] ~]# systemctl status iptables.service
● iptables.service - IPv4 firewall with iptables
   Loaded: loaded (/usr/lib/systemd/system/iptables.service; enabled; vendor preset: disabled)
   Active: inactive (dead)
[[email protected] ~]#


启动iptables服务

[[email protected] ~]# systemctl start iptables.service
[[email protected] ~]# systemctl status iptables.service
● iptables.service - IPv4 firewall with iptables
   Loaded: loaded (/usr/lib/systemd/system/iptables.service; enabled; vendor preset: disabled)
   Active: active (exited) since Tue 2017-08-15 22:27:23 EDT; 1s ago
  Process: 2243 ExecStart=/usr/libexec/iptables/iptables.init start (code=exited, status=0/SUCCESS)
 Main PID: 2243 (code=exited, status=0/SUCCESS)
Aug 15 22:27:23 localhost.localdomain systemd[1]: Starting IPv4 firewall with iptables...
Aug 15 22:27:23 localhost.localdomain iptables.init[2243]: iptables: Applying firewall rules: [  OK  ]
Aug 15 22:27:23 localhost.localdomain systemd[1]: Started IPv4 firewall with iptables.
[[email protected] ~]#


查看iptables默认访问规则

[[email protected] ~]# iptables -L -nv
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
   45  3348 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            state RELATED,ESTABLISHED
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            state NEW tcp dpt:22
    9   702 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT 36 packets, 4064 bytes)
 pkts bytes target     prot opt in     out     source               destination         
[[email protected] ~]#


查看iptables配置文件的默认规则设置:

[[email protected] ~]# cat /etc/sysconfig/iptables
# sample configuration for iptables service
# you can edit this manually or use system-config-firewall
# please do not ask us to add additional ports/services to this default configuration
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
[[email protected] ~]#


常用iptables配置范例:

[[email protected] ~]# iptables -L -nv
Chain INPUT (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ping       icmp --  *      *       0.0.0.0/0            0.0.0.0/0            icmptype 8 state NEW
   39  3016 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
    0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            state RELATED,ESTABLISHED
    0     0 ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     all  --  *      *       192.168.112.0        0.0.0.0/0           
    0     0 ACCEPT     all  --  *      *       10.0.10.0            0.0.0.0/0           
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:80
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:444
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:443
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:843
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:8001
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:8002
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:8003
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:8080
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:10050
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:10051
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
Chain OUTPUT (policy ACCEPT 31 packets, 2884 bytes)
 pkts bytes target     prot opt in     out     source               destination         
Chain ping (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0            icmptype 8 limit: avg 1/sec burst 5
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           
[[email protected] ~]#


此时如果想保存当前配置到某个文件(这里用access.txt),可以使用iptables-save命令:

[[email protected] ~]# iptables-save >access.txt
[[email protected] ~]# cat access.txt 
# Generated by iptables-save v1.4.21 on Tue Aug 15 22:41:42 2017
*nat
:PREROUTING ACCEPT [9:702]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [5:380]
:POSTROUTING ACCEPT [5:380]
COMMIT
# Completed on Tue Aug 15 22:41:42 2017
# Generated by iptables-save v1.4.21 on Tue Aug 15 22:41:42 2017
*raw
:PREROUTING ACCEPT [96:7170]
:OUTPUT ACCEPT [66:8472]
:OUTPUT_direct - [0:0]
:PREROUTING_direct - [0:0]
-A PREROUTING -j PREROUTING_direct
-A OUTPUT -j OUTPUT_direct
COMMIT
# Completed on Tue Aug 15 22:41:42 2017
# Generated by iptables-save v1.4.21 on Tue Aug 15 22:41:42 2017
*security
:INPUT ACCEPT [87:6468]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [66:8472]
:FORWARD_direct - [0:0]
:INPUT_direct - [0:0]
:OUTPUT_direct - [0:0]
-A INPUT -j INPUT_direct
-A FORWARD -j FORWARD_direct
-A OUTPUT -j OUTPUT_direct
COMMIT
# Completed on Tue Aug 15 22:41:42 2017
# Generated by iptables-save v1.4.21 on Tue Aug 15 22:41:42 2017
*mangle
:PREROUTING ACCEPT [96:7170]
:INPUT ACCEPT [96:7170]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [66:8472]
:POSTROUTING ACCEPT [66:8472]
:FORWARD_direct - [0:0]
:INPUT_direct - [0:0]
:OUTPUT_direct - [0:0]
:POSTROUTING_direct - [0:0]
:PREROUTING_ZONES - [0:0]
:PREROUTING_ZONES_SOURCE - [0:0]
:PREROUTING_direct - [0:0]
:PRE_public - [0:0]
:PRE_public_allow - [0:0]
:PRE_public_deny - [0:0]
:PRE_public_log - [0:0]
-A PREROUTING -j PREROUTING_direct
-A PREROUTING -j PREROUTING_ZONES_SOURCE
-A PREROUTING -j PREROUTING_ZONES
-A INPUT -j INPUT_direct
-A FORWARD -j FORWARD_direct
-A OUTPUT -j OUTPUT_direct
-A POSTROUTING -j POSTROUTING_direct
-A PREROUTING_ZONES -g PRE_public
-A PRE_public -j PRE_public_log
-A PRE_public -j PRE_public_deny
-A PRE_public -j PRE_public_allow
COMMIT
# Completed on Tue Aug 15 22:41:42 2017
# Generated by iptables-save v1.4.21 on Tue Aug 15 22:41:42 2017
*filter
:INPUT DROP [9:702]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [66:8472]
:ping - [0:0]
-A INPUT -p icmp -m icmp --icmp-type 8 -m state --state NEW -j ping
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -s 192.168.112.0/32 -j ACCEPT
-A INPUT -s 10.0.10.0/32 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 444 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 843 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 8001 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 8002 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 8003 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 8080 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 10050 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 10051 -j ACCEPT
-A ping -p icmp -m icmp --icmp-type 8 -m limit --limit 1/sec -j ACCEPT
-A ping -p icmp -j ACCEPT
COMMIT
# Completed on Tue Aug 15 22:41:42 2017
[[email protected] ~]#


如果不小心把配置全部清理了,这是可以用iptables-restore 命令重新将配置导入:

[[email protected] ~]# iptables -L -nv
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination 
Chain FORWARD (policy ACCEPT 0 packets, 0 by
 pkts bytes target     prot opt in     out     source               destination 
Chain OUTPUT (policy ACCEPT 0 packets, 0 by
 pkts bytes target     prot opt in     out     source               destination 
[[email protected] ~]# iptables-restore access.
[[email protected] ~]# iptables -L
Chain INPUT (policy DROP 0 packets, 0 by
 pkts bytes target     prot opt in     out     source               destination 
    0     0 ping       icmp --  *      *       0.0.0.0/0            0.0.0.0/0    icmptype 8 state NEW
    5   356 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0    ctstate RELATED,ESTABLISHED
    0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0    state RELATED,ESTABLISHED
    0     0 ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0   
    0     0 ACCEPT     all  --  *      *       192.168.112.0        0.0.0.0/0   
    0     0 ACCEPT     all  --  *      *       10.0.10.0            0.0.0.0/0   
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0    tcp dpt:80
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0    tcp dpt:444
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0    tcp dpt:443
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0    tcp dpt:843
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0    tcp dpt:8001
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0    tcp dpt:8002
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0    tcp dpt:8003
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0    tcp dpt:8080
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0    tcp dpt:10050
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0    tcp dpt:10051
Chain FORWARD (policy ACCEPT 0 packets, 0 by
 pkts bytes target     prot opt in     out     source               destination 
Chain OUTPUT (policy ACCEPT 4 packets, 416 by
 pkts bytes target     prot opt in     out     source               destination 
Chain ping (1 referen
 pkts bytes target     prot opt in     out     source               destination 
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0    icmptype 8 limit: avg 1/sec burst 5
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0   
[[email protected]


部分规则解释说明:

摘自:http://www.cnblogs.com/alwu007/p/6693822.html

[[email protected] ~]# systemctl enable iptables.service

编辑并修改配置文件/etc/sysconfig/iptables,使用下面的配置

*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:TEST - [0:0]
-A INPUT -j TEST
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -i eth1 -d 192.168.1.100 --syn -m recent --name suduip --rcheck --seconds 1 --hitcount 15 -j DROP
-A INPUT -p tcp -i eth1 -d 192.168.1.100 --syn -m recent --name suduip --set
-A INPUT -i eth1 -p tcp -m tcp -d 192.168.1.100 --syn -m connlimit --connlimit-above 50 --connlimit-mask 32 --connlimit-saddr -j DROP
#-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG SYN -m length --length 0:128 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
... ...
-A INPUT -j DROP
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j TEST
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A OUTPUT -j TEST
-A TEST -j RETURN
COMMIT


1.检查替换eth1;2.检查替换-d ip;3.若是centos6.8,检查iptables版本是v1.4.7还是v1.4.21,前者不支持–connlimit-saddr选项,去掉即可。下面,我简单解释一下这个配置


# filter表
*filter
# INPUT链默认策略为ACCEPT
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
# 自定义TEST链
:TEST - [0:0]
# 进入TEST链(从后面配置看,TEST链只是RETURN了回来,没有其他规则)
-A INPUT -j TEST
# 接受连接状态是RELATED和ESTABLISHED的包
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
# 接受ICMP协议的包
-A INPUT -p icmp -j ACCEPT
# 接受回环接口的包
-A INPUT -i lo -j ACCEPT
# 同一源IP1秒内最多可发起14次目的地址是192.168.1.100的TCP连接请求,15次及以上的包将被接口eth1丢弃
# 为什么同时指定-i和-d?猜测:路由器里的路由表可能人为或未及时更新导致路由表映射错误,导致发到接口eth1的包的目的IP错误。为了防止此类包,则需同时指定-i和-d
-A INPUT -p tcp -i eth1 -d 192.168.1.100 --syn -m recent --name suduip --rcheck --seconds 1 --hitcount 15 -j DROP
-A INPUT -p tcp -i eth1 -d 192.168.1.100 --syn -m recent --name suduip --set
# 同一源IP只允许50个目的地址是192.168.1.100的TCP连接请求,超出的包将被接口eth1丢弃
-A INPUT -i eth1 -p tcp -m tcp -d 192.168.1.100 --syn -m connlimit --connlimit-above 50 --connlimit-mask 32 --connlimit-saddr -j DROP
# 此条规则有问题(猜测,可能是--length 129 -j DROP)
#-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG SYN -m length --length 0:128 -j ACCEPT
# 下面这些规则对TCP连接请求包开放部分端口
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
... ...
# 丢弃所有包
-A INPUT -j DROP
# 上一条规则已经丢弃了所有包,此条规则貌似到不了
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j TEST
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A OUTPUT -j TEST
-A TEST -j RETURN
COMMIT


重启iptables

[[email protected] ~]# systemctl restart iptables.service


查看防火墙规则是否已应用

[[email protected] ~]# iptables -L -nv

本文出自 “平平淡淡才是真” 博客,请务必保留此出处http://ucode.blog.51cto.com/10837891/1956698

手动执行iptables命令配置企业生产环境下的防火墙

1.清除当前iptables规则 iptables -F iptables -Z iptables -X2.定义规则 iptables -P OUTPUT ACCEPT   iptables -P FORWARD ACCEPT & 查看详情

centos7.3下的qt输入中文

 我的QT目录在/opt/Qt/Tools/QtCreator,进入到/bin目录,然后运行./qtcreator.sh 就可以运行 在qtcreator.sh中加入export QT_IM_MODULE=iBus 就可以输入中文了。。。。 有一个缺点就是:  用快捷方式打开的话是不能输入中... 查看详情

centos7.3下开放防火墙的端口(代码片段)

CentOS7.3默认使用的是firewall作为防火墙,这里改为iptables防火墙。1:关闭firewall:systemctlstopfirewalld.servicesystemctldisablefirewalld.servicesystemctlmaskfirewalld.service2、安装iptables防火墙yuminstalliptables-services-y3.启动设 查看详情

ubuntu下使用ufw配置防火墙(简化iptables的操作)

...人帮它写了个界面,名字就叫做“Gufw”。由于Ubuntu下的iptables操作起来比较复杂,依赖关系比较多,所 查看详情

openwrt防火墙配置(极路由)

...个Linux,包管理使用opkg,只是改了一个界面而已。2、Linux下的防火墙最终都会归iptables进行管理,OpenWrt的防火墙机制同样也是,最上层采用了自己基于UCI标准的配置方法管理防火墙firewall,最终写入到iptables。3、UCI是OpenWrt统一配... 查看详情

ubuntu的ufw与iptables

...好的命令用于创建基于IPV4,IPV6的防火墙规则。由于Ubuntu下的iptables操作起来比较复杂,依赖关系比较多,所以使用UFW时可以简化很多操作。    注意⚠️慎重使用iptables–来清空所有链的规则,尽量避免ufw与... 查看详情

centos7.3安装配置powerline

一、Powerline简介及演示环境:Powerline是一个极棒的Vim编辑器的状态栏插件,主要用于显示状态行和提示信息。特点:使用Python编写,使其更具扩展性且功能丰富稳定易测的代码库,兼容Python2.6+和Python3支持多种Linux功能及工具的... 查看详情

iptables详解

参考技术Anetfilter/iptables(简称为iptables)组成Linux平台下的包过滤防火墙,与大多数的Linux软件一样,这个包过滤防火墙是免费的,它可以代替昂贵的商业防火墙解决方案,完成封包过滤、封包重定向和网络地址转换(NAT)等功... 查看详情

centos7.3安装squid的透明代理

...的代理软件,已不须多言,自己也测试了一把,不过,在centos7.3安装测试的过程,出现了问题,在做透明代理的时候,用iptables是可以成功的,而用firewall默认防火墙怎么也不成功,但真正知道了firwall的原理后,其实firewall已经... 查看详情

debian配置iptables

...是Centos6.x,它的配置较简单。下面对Debian上配置iptables做一个说明。配置过程环境要求一台Debian6.x/7.x及以上版本的机器登录用户名/密码配置步骤使用用户名/密码登录系统[email protected] 查看详情

iptables命令详解是啥

...路由时,都可以使用iptables进行控制。环境:操作系统:CentOS7,3。ip地址:172,16,55,7。扩展资料:iptables命令内核中控制网络的NetFilter定义的五个规则链,分别为PREROUTING,路由前。INPUT,数据包流入口。FORWARD,转发管卡。OUTP... 查看详情

linux下iptables配置详解

如果你的IPTABLES基础知识还不了解,建议先去看看.开始配置我们来配置一个filter表的防火墙.(1)查看本机关于IPTABLES的设置情况[[email protected]~]#iptables-L-nChainINPUT(policyACCEPT)target      protoptsource &nbs 查看详情

如何配置linux下的防火墙?

请说明具体详细一点!配置linux下的防火墙的方法,可以通过以下步骤操作来实现:一、在Linux系统中安装Iptables防火墙1、Linux发行版都预装了Iptables。您可以使用以下命令更新或检索软件包:二、关闭哪些防火墙端口防火墙安装... 查看详情

bind() 可以将 IPTABLES 中配置的端口作为转发端口

...rdingport【发布时间】:2016-03-0917:08:30【问题描述】:我有一个基于linux固件系统的网关。我有一个iptables规则,允许将端口8080转发到本地主机。我正在为这个linux网关开发一个应用程序。此应用程序将在8000和810 查看详情

[daily]使用iptables配置nat的命令速查

 时常,快速的配置一个临时的NAT环境是很常用需求。但是,每次我都要读iptables的手册,才能配出来。所以,备忘一个速查。 DNAT:iptables-tnat-APREROUTING-ieth1-d1.1.1.2-jDNAT--to-destination10.0.1.14 SNAT:iptables-tnat-APOSTROUTING-oeth2-... 查看详情

linux防火墙iptables配置详解

一、开始配置我们来配置一个filter表的防火墙.(1)查看本机关于IPTABLES的设置情况[[email protected]~]#iptables-L-nChainINPUT(policyACCEPT)target   protoptsource        destin 查看详情

centos7.3配置jdk环境

一、操作系统:CentOS7.3二、下载jdk1.8rpm包  http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html用wget下载失败,在Windows下载完成后,用filezilla传到服务器三、用RPM安装rpm包#rpm-ivhjdk-8u40-linux-x64.rpm四、配置 查看详情

iptables防火墙配置

...09;宿主机:Windows客户端实验原理防火墙会按照从上到下的顺序来读取配置的策略规则,在找到匹配项后就立即结束匹配工作并去执行匹配项中定义的行为(即放行或阻止)。如果在读取完所有的策略规则之后没有... 查看详情