Hi everyone,

I have been using jdbc to connect to a local mysql database on a linux machine.

I noticed that once I change the firewall policy to DROP by default using:

iptables -P INPUT DROP

the line:

Connection tempConn = DriverManager.getConnection (connString,user,pwd);

takes 3 minuites and 10 seconds.

If I change the default policy to ACCEPT:

iptables -P INPUT ACCEPT

This will take 2 seconds exactly instead. I have set all the rules I need to connect (accept port 3306 for INPUT and OUTPUT, for tcp, added udp to no avail), but something must be getting dropped somehow somewhere when I changed the default policy.

Can anyone shred some light onto this, such as how it connects and if there is any other specific rules I need to set? I couldn't find any special packets with tcpdump that got dropped.