LinuxSay - A Discussion Forum for Linux Enthusiasts

How to block all the ports except port 22

How to block all the ports except port 22 in Ubuntu 14, can any one advise , incoming ports all must be blocked and outbound should work…
…,…
.

Hi go through the below link

Install APF on Ubuntu and configure the file apf /etc/apf/conf.apf to disable the ports.