Ben's

iptables -j vs iptables -g 본문

리눅스/iptables

iptables -j vs iptables -g

Ben Ko (SINCE 2013) 2013. 1. 21. 16:06
728x90
 -j, --jump target
This specifies the target of the rule; i.e., what to do if the packet matches it. The target can be a
user-defined chain (other than the one this rule is in), one of the special builtin targets which decide
the fate of the packet immediately, or an extension (see EXTENSIONS below). If this option is omitted
in a rule (and -g is not used), then matching the rule will have no effect on the packet's fate, but the
counters on the rule will be incremented.

-g, --goto chain
This specifies that the processing should continue in a user specified chain. Unlike the --jump option
return will not continue processing in this chain but instead in the chain that called us via --jump.

========================================================================

-j Chain Name 하면 체인으로 보내지고 나서 다시 복귀를 하는 반면

-g Chain Name 하면 체인으로 보내지고 나서 다시 복귀를 하지않고 거기서 처리가 종료됨.