I'm setting up ufw for the first time. Using Ubuntu 10.04 LTS on an OpenVZ VPN and have the following rules:
sudo ufw allow 22/tcp
sudo ufw allow 25/tcp
sudo ufw allow 53
sudo ufw allow 80
sudo ufw allow 443
sudo ufw default deny
SSH and everything else works fine, and I can access static content on nginx. However when I visit a PHP page, it takes ages before giving a 504 Gateway Time-out page. I'm using php5-fpm
I've tried a number of rules including the following:
allow from 127.0.0.1 to 127.0.0.1 port 9000
allow from 127.0.0.1 port 9000 to 127.0.0.1 port 9000
allow 9000
allow from 127.0.0.1 to 127.0.0.1
But none of them fix the problem. As soon as I turn off the firewall, everything works fine. Php5-fpm is definitely running and using port 9000.
Any help appreciated, thanks! I'll post back if I work it out.
Additional config: http://pastebin.com/3e6rHRti