Need help to figure out iptables rule
- by Master
I have this iptable rule listing
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT tcp -- 127.0.0.1 0.0.0.0/0 tcp dpt:3306
acctboth all -- 0.0.0.0/0 0.0.0.0/0
VZ_INPUT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:3306
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:3306
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:3306
ACCEPT tcp -- 94.101.25.40 0.0.0.0/0 state NEW tcp dpt:3306
Chain FORWARD (policy DROP)
target prot opt source destination
VZ_FORWARD all -- 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy DROP)
target prot opt source destination
acctboth all -- 0.0.0.0/0 0.0.0.0/0
VZ_OUTPUT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT tcp -- 94.101.25.40 0.0.0.0/0 state NEW tcp dpt:3306
I want only localhost and my ip to access tcp 3306. Can i deleted all other rules as shown above. I don't know if i nned to keep any of them or not