Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've installed ufw on my Ubuntu 10.04 server. The only thing running on that server is going to be ElasticSearch and Redis. Redis uses port 6379. I only want two different IPs to be able to access the IP address of this machine on that port. I ran the following command:

sudo ufw allow from xx.xx.xx.x1 to any port 6379
sudo ufw allow from xx.xx.xx.x2 to any port 6379
sudo ufw status

To                         Action      From
--                         ------      ----
22                         ALLOW       Anywhere
6379                       ALLOW       xx.xx.xx.x1
6379                       ALLOW       xx.xx.xx.x2
80                         ALLOW       Anywhere
8080                       ALLOW       Anywhere
8080/tcp                   ALLOW       Anywhere

To me it appears as if those two IPs should then be able to access that IP address on that server. But they aren't able to make a connection. Are there other ports I need to open for this to be able to happen?

share|improve this question

I figured it out. Deleting the follow rule fixed it such that only those IPs were able to connect.

ufw delete allow 8080

8080                         ALLOW       Anywhere
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.