• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to setup Firewall using GUFW in Ubuntu 16.04.

2377

To setup Firewall using GUFW in Ubuntu 16.0

Setting up iptables firewall can be difficult for Linux beginners. Ubuntu has made it a little bit easier. GUFW, aka uncomplicated firewall, is the front end for iptables. Gufw on the other hand is the graphical front-end for UFW and it’ s one of the easiest firewalls in the world. It is so simple to setup firewall using GUFW in Ubuntu 16.0

Setting Up Firewall

To install Gufw, just open up a terminal and run the following command.

root@linuxhelp:~# apt-get install gufw
Reading package lists... Done
Building dependency tree      
.
Setting up gufw (16.04.1-0ubuntu1.1) ...

Now you can launch gufw in Unity Dash. By default, you have 3 different profiles: public, office and home. Here Home is chosen.
1

The most basic setup for a home computer is denying all incoming traffic and allowing all outgoing traffic. You will be able to surf the Internet. To achieve this, you just need to switch status from off to on.
2

To add your own firewall rules, click on the Rules tab then click on the plus sign. (You need to switch status on in order to add your own rules).

RULES

You can add firewall rule for a specific application such as 0 A.D. or a protocol such as SSH.
4


Let’ s say you want to disable SSH login on your Ubuntu 16.04 desktop, i.e. you don’ t allow other computers to SSH into your Ubuntu machine but at the same time you want to SSH into another computer from you Ubuntu 16.04 desktop, all you need to do is set policy to Deny, select In as the direction, select Network in category, select Services in subcategory, selectSSH in application and click the Add button.
5

You will see a new firewall in the Rules tab.
6

If you like to play with the command line, here’ s the command to check ufw status.

root@linuxhelp:~# ufw status
Status: active

To                         Action      From
--                         ------      ----
22/tcp                     DENY        Anywhere                  
22/tcp (v6)                DENY        Anywhere (v6)     

7

To enable Gufw on system startup, enter this command.

root@linuxhelp:~# ufw enable


Firewall is active and enabled on system startup.
8

Overall, UFW is able to protect your VPS against the most common hacking attempts. Of course, your security measures should be more detailed than just using UFW. However, it is a good (and necessary) start.

Tags:
elijah
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

After installing ufw also my 80 port is not accessible ?

A

you have to allow it in ufw using following command

# UFW allow 80

Q

What is UFW Ubuntu?

A

The default firewall configuration tool for Ubuntu is ufw. Developed to ease iptables firewall configuration, ufw provides a user friendly way to create an IPv4 or IPv6 host-based firewall. By default UFW is disabled. Gufw is a GUI that is available as a frontend

Q

What is iptables Linux?

A

iptables is a user-space utility program that allows a system administrator to configure the tables provided by the Linux kernel firewall (implemented as different Netfilter modules) and the chains and rules it stores.The term iptables is also commonly used to inclusively refer to the kernel-level components.

Q

What is Dport in firewall?

A

--dport stands for DESTINATION port. This matches against the target port of the connection. --sport stands for SOURCE port. This is the port on which the packet originated. For example, all http connections have DPORT 80 for packets from client->server, and SPORT 80 for server->client.

Q

Is SSH a TCP or UDP?

A

SSH needs port 22/tcp. You're asking if opening 22/tcp and 22/udp presents a security vulnerability. The answer is "no" if nothing is listening to 22/udp.

Related Tutorials in How to setup Firewall using GUFW in Ubuntu 16.04.

Related Tutorials in How to setup Firewall using GUFW in Ubuntu 16.04.

How to install Meld tool in Ubuntu
How to install Meld tool in Ubuntu
Feb 25, 2017
How to install Dconf-Editor on Ubuntu 18.04
How to install Dconf-Editor on Ubuntu 18.04
Jul 14, 2018
How to install and update OpenSSL on Ubuntu 16.04
How to install and update OpenSSL on Ubuntu 16.04
Mar 9, 2017
How to install GLib 2.0 on Ubuntu 17.04
How to install GLib 2.0 on Ubuntu 17.04
May 22, 2017
How to Install Android Emulator on Ubuntu 20.4.1
How to Install Android Emulator on Ubuntu 20.4.1
Jul 13, 2021
How To Install AnyDesk on Ubuntu 16.04
How To Install AnyDesk on Ubuntu 16.04
Apr 4, 2018
How to install Genymotion 2.12.1 on Ubuntu 18.04
How to install Genymotion 2.12.1 on Ubuntu 18.04
Jul 9, 2018
How to install Timeshift 18.4 on Ubuntu 18.04
How to install Timeshift 18.4 on Ubuntu 18.04
Jul 6, 2018

Related Forums in How to setup Firewall using GUFW in Ubuntu 16.04.

Related Forums in How to setup Firewall using GUFW in Ubuntu 16.04.

Ubuntu
matthew class=
Failed to enable unit: Refusing to operate on linked unit file sshd.service
Apr 15, 2019
Ubuntu
mason class=
Passwd: You may not view or modify password information for root On Ubuntu 19.04
May 27, 2019
Ubuntu
isaac class=
/etc/apt/sources.list Permission denied
May 18, 2017
Firewall
kishore class=
How to check log for CSF firewall
Jan 2, 2018
Ubuntu
yousuf class=
lsb_release command not working : Debian
Jan 18, 2018
ifconfig command
jackbrookes class=
what is the location of the ifconfig program on your machine?
Jan 4, 2018
Ubuntu
mason class=
"E: Package 'php-mcrypt' has no installation candidate" error on Ubuntu 20.4.1
Mar 15, 2021
NFS
luke class=
clnt_create: RPC: Program not registered
Apr 25, 2017

Related News in How to setup Firewall using GUFW in Ubuntu 16.04.

Related News in How to setup Firewall using GUFW in Ubuntu 16.04.

How To Install Mixxx on Ubuntu 16.04
How To Install Mixxx on Ubuntu 16.04
Oct 11, 2017
Ubuntu 17.04 released with greater expectations
Ubuntu 17.04 released with greater expectations
Apr 15, 2017
Ubuntu Core now available on i.MX6 based TS-4900 thanks to Technologic Systems Inc.
Ubuntu Core now available on i.MX6 based TS-4900 thanks to Technologic Systems Inc.
Mar 1, 2017
Ubuntu 17.10 Artful Aardvark Beta 1 is now here. Download Now
Ubuntu 17.10 Artful Aardvark Beta 1 is now here. Download Now
Sep 2, 2017
Ubuntu Unity is no more: One Linux dream has been axed
Ubuntu Unity is no more: One Linux dream has been axed
Apr 7, 2017
What’s next for Ubuntu Linux Desktop?
What’s next for Ubuntu Linux Desktop?
Apr 11, 2017
Say Hi to Ubuntu's new mascot
Say Hi to Ubuntu's new mascot
Mar 22, 2019
KDE Connect App was removed from Google Play Store and brought back in 24 hours
KDE Connect App was removed from Google Play Store and brought back in 24 hours
Mar 22, 2019
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Lucas ?
Various options in Top command

Am using Top command only to view the load average, what are the various options in Top command..??

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.