Need help to figure out iptables rule

Posted by Master on Server Fault See other posts from Server Fault or by Master
Published on 2010-06-09T01:15:52Z Indexed on 2010/06/09 1:23 UTC
Read the original article Hit count: 199

Filed under:
|

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

© Server Fault or respective owner

Related posts about centos

Related posts about iptables