IT/Software/Server Config/UFW: Difference between revisions

From msgwiki
Jump to navigation Jump to search
Access restrictions were established for this page. If you see this message, you have no access to this page.
(Created page with "This is the default firewall in Linux Turn it on sudo ufw enable Check Status sudo ufw status <br />")
 
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 3: Line 3:
Turn it on
Turn it on


sudo ufw enable
<code>sudo ufw enable</code>


Check Status
Check Status


sudo ufw status
<code>sudo ufw status</code>


<br />
Add a port
 
<code>sudo ufw allow 22</code>
 
Close a port
 
<code>sudo ufw deny 22</code>
 
We normally open
 
http 80
https 443
ssh 22
 
nfs 111(tcp/udp) 2049
 
cups 631, 53, 5353, 6566
 
nomachine 4000
 
 
Additionaly if you are mounting nfs shares in fstab you may end up needing more ports.
 
rund this command and see what ports it uses.  Then open those.
 
<code>sudo mount -a -v</code>
 
We ended up opening 41238 and 53847 just for nfs

Latest revision as of 08:53, 8 April 2021

This is the default firewall in Linux

Turn it on

sudo ufw enable

Check Status

sudo ufw status

Add a port

sudo ufw allow 22

Close a port

sudo ufw deny 22

We normally open

http 80 https 443 ssh 22

nfs 111(tcp/udp) 2049

cups 631, 53, 5353, 6566

nomachine 4000


Additionaly if you are mounting nfs shares in fstab you may end up needing more ports.

rund this command and see what ports it uses. Then open those.

sudo mount -a -v

We ended up opening 41238 and 53847 just for nfs