Uncomplicated Fire Wall not working

I have set up UFW on Ubuntu for a mailserver. I have the following rules

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       Anywhere                  
25/tcp                     ALLOW       Anywhere                  
465/tcp                    ALLOW       Anywhere                  
587/tcp                    ALLOW       Anywhere                  
110/tcp                    ALLOW       Anywhere                  
995/tcp                    ALLOW       Anywhere                  
143/tcp                    ALLOW       Anywhere                  
993/tcp                    ALLOW       Anywhere                  
22/tcp (v6)                ALLOW       Anywhere (v6)             
25/tcp (v6)                ALLOW       Anywhere (v6)             
465/tcp (v6)               ALLOW       Anywhere (v6)             
587/tcp (v6)               ALLOW       Anywhere (v6)             
110/tcp (v6)               ALLOW       Anywhere (v6)             
995/tcp (v6)               ALLOW       Anywhere (v6)             
143/tcp (v6)               ALLOW       Anywhere (v6)             
993/tcp (v6)               ALLOW       Anywhere (v6)  

Open in new window


However when I run NMAP it is not working. I'm getting the following results for nmap.

Not shown: 990 filtered ports
PORT     STATE  SERVICE
21/tcp   open   ftp
22/tcp   open   ssh
110/tcp  closed pop3
143/tcp  closed imap
465/tcp  closed smtps
554/tcp  open   rtsp
587/tcp  closed submission
993/tcp  closed imaps
995/tcp  closed pop3s
7070/tcp open   realserver

Open in new window


Why isn't UFW working?
burnedfacelessAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Keelyn HenningIT System AdministratorCommented:
I know this is a silly question but I have done it before so that is why I ask. Did you sudo enable UFW?
0
burnedfacelessAuthor Commented:
Yes I did
0
Dave BaldwinFixer of ProblemsCommented:
All the ports used by a mail server are closed.  Do you have a mail server like Postfix running that would be listening on those ports?  Without a service to listen to them, ports will always show closed.
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
arnoldCommented:
From where are you running nmap in relation to the server?
Run nmap locally.
UFW controls access on the server, if the server is connected to the Internet through a router/firewall, you need to open ports on the external firewall to allow those services from the outside to reach the server.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.