SOLVED How to use proxies with random ports?

d3stroyah

Member
Oct 30, 2020
5
0
1
italy
cPanel Access Level
Root Administrator
Hi, I'm configuring a simple script that uses python and requests module with a list of proxies for GET calls. It's pretty simple but my proxies vary for both IP and PORT.
When using port 80 everything works great but as soon as the port changes WHM firewall blocks it, unless I specify the exception for the port in the TCP_OUT section in WHM Firewall. Now this is a huge problem for me, my proxies change every second, I can't open all ports just for this, is there a way to solve this issue?
It's really important for me, I need to keep using this proxy provider, thanks for any help or suggestion!
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
3,186
398
243
cPanel Access Level
Root Administrator
Hey there! Any ports your proxy service uses will need to be opened in the server's firewall. Is it possible for the proxy provider to be limited to a certain range? For example, passive FTP is opened from port 30,000 to 50,000 by default, but that range is often made much smaller by server admins with few active users so they don't have to keep all those ports opened in the firewall. If your proxy tool can have a range limit configured you could open that port range in CSF and that would take care of the issue permanently.
 

d3stroyah

Member
Oct 30, 2020
5
0
1
italy
cPanel Access Level
Root Administrator
Thanks for the reply. I'll make sure of this option. What am I actually risking opening TCP_OUT for a range of ports? For example 3000:7000 ? (this is the range I saw in my proxies)
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
3,186
398
243
cPanel Access Level
Root Administrator
I don't think that's too crazy at all, really, especially if you're only doing this for outbound traffic. That way, any malicious traffic wouldn't even be able to connect to your server over those ports or see them open with a port scan.