I'm trying to set up an UFW firewall like this:
- Allow all incoming and outgoing connections to IP 184.108.40.206 (all ports);
- Deny all other connections (incoming and outgoing);
For the first item, the command below seems to work just fine:
sudo ufw allow from 220.127.116.11
The status of UFW after that shows:
To Action From -- ------ ---- Anywhere ALLOW IN 18.104.22.168
Do i need a port range for that? Or specify both UDP and TCP protocols?
Now, for the second item. Is it possible just to say "deny everything else" with UFW?
Or can i use some sort of wildcard? Like "deny from [^22.214.171.124]". (i tried)