Hi, I don’t cant open a range ports. For exemple: range: 10000/20000 UPD and open port 5060/UDP, how to make?
Tks, sorry my english!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello, @thiago.tda
As per @xMudrii reply you can use UFW in order to do that.
UFW, or Uncomplicated Firewall, is an interface to iptables that is geared towards simplifying the process of configuring a firewall. While iptables is a solid and flexible tool, it can be difficult for beginners to learn how to use it to properly configure a firewall. If you’re looking to get started securing your network and are not sure which tool to use, UFW may be the right choice for you.
You can check our full tutorial here for Debian 10:
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-debian-10
Allowing Specific Port Ranges
You can specify port ranges with UFW. For example, some applications use multiple ports instead of a single port.
For example, to allow X11 connections, which use ports 6000-6007, use these commands:
sudo ufw allow 6000:6007/tcp
sudo ufw allow 6000:6007/udp
Hope that this helps! Regards, Alex
Hi @thiago.tda,
If you are trying to open a range ports for firewall follow one of solutions.
In case you are using IPTABLES:
- sudo iptables -A INPUT -p udp -m udp --dport 5060 -j ACCEPT
- sudo iptables -A INPUT -p udp -m udp --dport 10000:20000 -j ACCEPT
It is very probably that you are using IPTABLES so I recommend you to go with it.
If you somehow use ufw following will help:
- sudo ufw allow 5060/udp
- sudo ufw allow 10000:20000/udp
Good luck :)
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.