Hello! I found the script:

# ufw default deny incoming
# ufw default deny outgoing
# ufw allow out on XYZ to XXX.XXX.XXX.XXX
# ufw allow out on tun0
# ufw enable

XYZ - virtual interface network card (wlp3s0, or eth0), XXX.XXX.XXX.XXX - ip VPN-server. Seems good but my VPN provider gives me dynamic ip. I tried to add istead XXX.XXX.XXX.XXX - 120.XXX.XXX.XXX, and 120.*.*.* but ufw says - incorrect destination. What I should do?

How to add a rule for the ufw with IP range? I seen ip addresses such as with numbers behind the slash. Where can I find the IP range table?