Familie Bruin

Welkom op onze site

Inloggen

Or sign in with your account on:

Not a member yet? Register

ICT Kennisbank

Block incoming ip address using iptables CentOS

OPTIONS IP tables (short or long options are allowed)

--append  -A Append to chain
--delete  -D Delete matching rule from chain
--delete  -D Delete rule rulenum (1 = first) from chain	
--insert  -I Insert in chain as rulenum (default 1=first)
--replace -R Replace rule rulenum (1 = first) in chain
--list    -L List the rules in a chain or all chains

--source      -s [!] address[/mask] source specification
--destination -d [!] address[/mask] destination specification                         
--jump        -j target

INPUT = Incoming Access
OUTPUT = Outgoing Access
-I = Insert
-D = Delete
-s = Source Ip Address
-j = Target Action
DROP = Block action

Add IP address (effects immediately)
syntax : iptables -I INPUT -s IP-ADDRESS -j DROP

Remove blocked IP address
syntax : iptables -D INPUT -s IP-ADDRESS -j DROPOP

List iptable rules
syntax: iptables -L -n