IPTABLE

 

 


-A — adds a rule at the end of the chain
-I — inserts the rule at the given rule number. If no rule number is given the rule is inserted at the head of the chain.
-p — protocol of the rule
–dport the destination port to check on the rule
-i — interface on which the packet was received.
-j — what to do if the rule matches
-s — source IP address of packet
-d — destination IP address of packet

There are three real “chains” which iptables uses:

* INPUT
Which is used to grant or deny incoming connections to your machine.
* OUTPUT
Which is used to grant or deny outgoing connections from your machine.
* FORWARD
Which is used for forwarding packages across interfaces, only really needed (in general) when you’re setting up a gateway machine.

/sbin/iptables -I INPUT -s {IP-HERE} -j DROP

iptables -I OUTPUT -d 108.255.255.255 -j DROP        .

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s