Help in setting Firewall (ufw)

Knute Johnson knute2009 at www.knutejohnson.com
Sun Jan 18 01:33:36 UTC 2009


Roy M. wrote:
> Hello,
> 
> Can anyone help me to translate my requests below to ufw commands...
> 
> 1. Block all access to server, except port 80 from public
> 2. Enable ssh access (listening on port 8900), from IP range
> 202.192.010.002 to  202.192.010.007
> 
> THx...
> 

sudo ufw enable

sudo ufw allow 80/tcp

sudo ufw allow proto tcp from 202.192.10.2 to any port 8900
sudo ufw allow proto tcp from 202.192.10.3 to any port 8900
                                         .4
                                         .5
                                         etc

You have to do these separately as there is no way to do just the few 
you want with one command.

-- 

Knute Johnson
knute2009 at www.knutejohnson.com





More information about the ubuntu-users mailing list