
12-10 Configuring Packet Filters Using the iptables and ip6tables Commands
LX Series Configuration Guide
A chain consists of a series of rules that specify the criteria
for accepting, denying, or dropping a packet. The criteria
for accepting, denying, or dropping a packet can include
the source IP Address, the destination IP Address, and
other characteristics.
X To add a rule to a chain
Use the following
iptables
or
ip6tables
command syntax
from the CLI:
Syntax
iptables <
string
>
ip6tables
<string>
The following sections provide examples of how to create rules
using various options of the iptables and ip6tables commands.
For detailed information on the iptables and ip6tables
commands, see Appendix D “Linux Man Pages for iptables and
ip6tables Commands” on page D-1.
X To create a rule to drop packets based on the
source IP address
Use the
iptables
command. The following example creates a
rule that will drop any packets coming to the LX from source
address
10.240.10.240
:
Example Config:0 >>
iptables -A INPUT -s 10.240.10.240 -j DROP
Use the
ip6tables
command. The following example creates a
rule that will drop any packets coming to the LX from source
address
fe80::220:edff:febe:3cae
:
Example Config:0 >>
ip6tables -A INPUT -s fe80::220:edff:febe:3cae
-j DROP
Comentarios a estos manuales