找回密码
 注册
查看: 1251|回复: 1

iptables 防火墙规则删除操作记录 -D 参数 INPUT进规则

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2022-1-17 15:00:01 | 显示全部楼层 |阅读模式
[root@compute10 ~]# iptables -L -n --line-numbers
+ y' R+ u4 j/ U7 UChain INPUT (policy ACCEPT)/ T1 }4 ~* E( t
num  target     prot opt source               destination         
( S" S6 P, l, K3 w  n1    ACCEPT     tcp  --  10.161.53.0/27       0.0.0.0/0            multiport dports 5900:5999 /* ACCEPT VNC Port only by Controller Node */6 `8 z$ U) C2 b- ^: r3 l
2    REJECT     tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 5900:5999 reject-with icmp-port-unreachable
+ h6 t+ L7 p' `3    ACCEPT     tcp  --  10.161.53.0/27       0.0.0.0/0            multiport dports 5900:5999 /* ACCEPT VNC Port only by Controller and compute Node */
4 k/ ]* Z' b9 l; ]0 D* P& \, O4    ACCEPT     tcp  --  10.161.53.100        0.0.0.0/0            multiport dports 5900:5999 /* ACCEPT VNC Port only by Windows remote Node */5 F4 q# z$ s/ S  i
5    REJECT     tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 5900:5999 reject-with icmp-port-unreachable
: k* r$ d1 O/ N& m9 wChain FORWARD (policy ACCEPT)6 w$ q/ G% A$ h# Z7 G0 |: {% K- O
num  target     prot opt source               destination         ; S7 x& o) R. @6 F
Chain OUTPUT (policy ACCEPT)
8 W. z% M. Q* Y# U6 ^! e, hnum  target     prot opt source               destination         
3 f  Q" j8 z7 K( a4 w: u[root@compute10 ~]# iptables -D INPUT 1
' r; b7 i0 `2 m* R( `[root@compute10 ~]# iptables -D INPUT 2% r2 U! n$ t" v9 u
[root@compute10 ~]# iptables -D INPUT 3* B3 p; G4 |1 F: t' X& b' i" a
[root@compute10 ~]# iptables -D INPUT 4) y. e( w4 }0 g
iptables: Index of deletion too big.
' g) C2 W' i% N0 z[root@compute10 ~]# iptables -L -n --line-numbers 5 z& m, F3 a3 @) T0 G% V
Chain INPUT (policy ACCEPT); L* O! r0 N$ p" I- J8 j4 W
num  target     prot opt source               destination         
% C: j4 r& u+ d& \1    REJECT     tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 5900:5999 reject-with icmp-port-unreachable
! y4 x/ R4 k7 r% F; u2    ACCEPT     tcp  --  10.161.53.100        0.0.0.0/0            multiport dports 5900:5999 /* ACCEPT VNC Port only by Windows remote Node */* k' j1 u& V5 @0 z" T+ A, {3 t- _4 d
Chain FORWARD (policy ACCEPT)
! h- _- p" j& pnum  target     prot opt source               destination         , m" q, G7 p6 Q( Y  q, M
Chain OUTPUT (policy ACCEPT)
4 q$ p: o/ i8 z: r2 ]num  target     prot opt source               destination         
; u) i5 O( U9 W[root@compute10 ~]# iptables -D INPUT 1
7 S3 ~# l' M+ u[root@compute10 ~]# iptables -D INPUT 2! {/ B, q  V+ `3 u
iptables: Index of deletion too big.6 ^& T. ^+ i0 T+ z' @; Z# p- G& b3 x
[root@compute10 ~]# iptables -L -n --line-numbers # H( U2 f, }( J5 {5 A' G: c, V$ P
Chain INPUT (policy ACCEPT)$ ]' o6 t' R( t
num  target     prot opt source               destination         / ~, q) s( G6 D9 [6 h
1    ACCEPT     tcp  --  10.161.53.100        0.0.0.0/0            multiport dports 5900:5999 /* ACCEPT VNC Port only by Windows remote Node */
( n; u" L8 L9 ?! h8 Y7 HChain FORWARD (policy ACCEPT)1 q2 \: T: p  `: x* ^) \
num  target     prot opt source               destination         
. |% m) J% c4 U% {# _' j0 {4 o, y) h  ^Chain OUTPUT (policy ACCEPT)* @5 _5 f' b) \
num  target     prot opt source               destination         
( Q9 @+ }& I8 ^  |; v1 g. B( z6 ~[root@compute10 ~]# iptables -D INPUT 1( T* `7 f# |( d& o
[root@compute10 ~]# iptables -L -n --line-numbers . A* ?" S# K5 G
Chain INPUT (policy ACCEPT)
& L7 ]/ S& w+ G! `* Dnum  target     prot opt source               destination         
$ O. T# Q$ i: H* [- RChain FORWARD (policy ACCEPT)- F! Q9 g  i  {, l% Z0 ^. N" W
num  target     prot opt source               destination         
# t, x- c  w- B" j6 A$ H1 @Chain OUTPUT (policy ACCEPT)
3 z7 I' Q* X0 d" [. y- D7 snum  target     prot opt source               destination         : b- W  {$ d4 y3 t# s# \

, |& V; {3 `; |  d. m

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-7-1 13:49:09 | 显示全部楼层
iptables -A INPUT -s 10.161.53.31/27 -p tcp -m multiport --dports 5900:5999 -m comment --comment "ACCEPT VNC Port only by Controller Node" -j ACCEPT
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 01:56 , Processed in 0.018991 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表