Skip to content

Commit 00e40ce

Browse files
committed
Added
1 parent b74c053 commit 00e40ce

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

unix-firewall-iptables.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Title: Unix: Using iptables
2+
Tags: unix-iptables,unix
3+
4+
First create a ipfilters firewall file. Call it ipfilter.firewall.rules for example. Here's an example: http://library.linode.com/securing-your-server#sph_creating-a-firewall
5+
6+
* -A means append the rule to the end of the table with the table specified, such as INPUT.
7+
* -j means perform this action on matching the rule, REJECT for example.
8+
* -i specifies the interface to listen on.
9+
* -d specifies the destination including the network mask.
10+
* --dport specifies the destination port
11+
* -p specifies the protocol, such as tcp
12+
13+
You can then set it as your firewall like so:
14+
15+
iptables-restore < iptables.firewall.rules
16+
17+
Then you can list all the added rules via
18+
19+
iptables -L

0 commit comments

Comments
 (0)