IPtables Flashcards

1
Q

Dump iptables (with counters) rules to stdout

A

iptables-save -c >

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Restore iptables rules

A

iptables-restore

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

List all iptables rules with affected and line numbers

A

iptables -L -v –line-numbers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Flush all iptables rules

A

iptables -F

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Change default policy for rules that don’t match rules

A

iptables -P

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Allow established connection on INPUT

A

iptables -A INPUT -i -m state –state RELATED,ESTABLISHED -j ACCEPT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Delete 7th inbound rule

A

iptables -D INPUT 7

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Increase throughput by turning off statefullness

A

iptables -t raw -L -n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Drop all packets

A

iptables -P INPUT DROP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly