User guide

Chapter 13: Command Line Interface
205
iptables Command Examples
Iptablescanbeconfiguredinaplethoraofwaysthatisoutsidethescope
ofthisdocument.Theexamplesbelowshowsomesimpleconfiguration
optionscreatedwithiptables.
Thefollowingexampleenablesalogforiptables:
admin > firewall > iptables -A INPUT -t filter -j LOG
--log-prefix DOM_IPACL -m state --state NEW -s <IP>
Addingadefaultlocalrule
ThedefaultlocalruleisaddedasstandardimplementationinDominion
SX.
Restri
ctingAccessfromanIPAddress
TorestrictaccesstotheSXfromaspecificIPaddress(192.168.1.100):
admin > Security > firewall > iptables -A INPUT -t filter
-j DROP
-s 192.168.1.100
LoggingamessagewhenIPAddressconnects
TosendasyslogmessagewhenanIPAddressconnectstotheSX:
admin > Security >firewall >iptables -A INPUT -t filter
-j LOG
--log-prefix DOM_IPACL -m state --state NEW -s
192.168.1.100
AllowingAccessfromanIPRange
Toal
lowacce
sstotheSXfromaspecificIPrange
(192.168.0.1192.168.0.255).
admin > Security > firewall > iptables -A INPUT -t filter
-j ACCEPT -s 192.168.0.0/255.255.255.0
DisableallICMPtraffic
TodisableICMPprotocoltraffic,andhavetheSXnotrespondtopings.
admin > Security > firewall > iptables -A INPUT -p icmp
-j DROP
PreventAccesstotheTelnetportfromanIPAddress
Todisableacccesstothetelnetportforapa
rticularipaddre
ss
admin > Security > firewall > iptables -A INPUT -p tcp
--dport 23
-j DROP -s 192.168.0.100