小编St.*_*ven的帖子

使用 iptables 仅允许来自指定 IP 地址的流量

我有一个专用服务器(我只使用实验室/测试环境)。在服务器上运行 CentOS 5.6 并且它作为 KVM 主机运行。

为了稍微保护一些东西,我想执行以下操作,使用“iptables”来仅允许来自某些 IP 地址(我自己的地址)的流量。

我当前的iptables配置如下所示:

[kvm]# iptables -L -v
Chain INPUT (policy ACCEPT 4927K packets, 6424M bytes)
 pkts bytes target     prot opt in     out     source               destination         
   41  2744 ACCEPT     udp  --  virbr0 any     anywhere             anywhere            udp dpt:domain 
    0     0 ACCEPT     tcp  --  virbr0 any     anywhere             anywhere            tcp dpt:domain 
   66 21810 ACCEPT     udp  --  virbr0 any     anywhere             anywhere            udp dpt:bootps 
    0     0 ACCEPT     tcp  --  virbr0 any     anywhere             anywhere            tcp dpt:bootps 
3573K 3515M fail2ban-SSH …
Run Code Online (Sandbox Code Playgroud)

ip iptables address kvm-virtualization

3
推荐指数
1
解决办法
6083
查看次数

标签 统计

address ×1

ip ×1

iptables ×1

kvm-virtualization ×1