VICIdial Dynportal issue on Cloudflare SSL

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

VICIdial Dynportal issue on Cloudflare SSL

Postby callcentertech » Sat Aug 13, 2022 12:56 pm

Hello All,

Here is what I have achieved so far.
Setup Cloudlfare SSL for Apache2, dynprtal, viciphone and asterisk web socket (Fully Working)
Configured page rules and everything else in cloudflare to make it work

The issue is with the Dynportal. When I whitelist my IP. It should ideally take client machine IP, but instead its grabbing one of the proxy IP of client's nearest Cloudflare node.

I changed $remoteip=$_SERVER['REMOTE_ADDR'] to $remoteip=$_SERVER['HTTP_X_FORWARDED_FOR'] , It works but there are two issues with that.
1. Its a security risk
2. It does not whitelist (dynamic) the IP

Please advise..
Email: kaushal@callcentertech.net, Phone/WhatsApp: +1 (636)-556-0022
Web: https://www.callcentertech.net, Skype: live:52956f35f3283f55
Fully Automated VICIdial Installer https://www.callcentertech.net/vicifast/
callcentertech
 
Posts: 48
Joined: Sat Jul 17, 2021 2:01 pm
Location: Ahmedabad, India

Re: VICIdial Dynportal issue on Cloudflare SSL

Postby williamconley » Wed Apr 10, 2024 5:03 pm

You miss an obvious concept: Your agents are access the server through cloudflare. The traffic is not coming from the agent's IP to your server's IP. Thus IPTables/NFTables (or any other firewall based on IP) will only see the IP of the Cloudflare uplink, not the IP of the agent in question.

To use dynamic IP on the Vicidial server you may need to use the true-client-ip header and build a complete system around that true IP into the apache server. This, of course, is both cumbersome and expensive since the true-client-ip header is only available on enterprise cloudflare.

However: You COULD dual home the server's dns. Give it two subdomains. Use one for Dynamic (which will pass through Cloudflare). This will then add the agent's true IP address to the dynamic IP list allowing the agent to access the secondary dns subdomain from their true IP. The secondary dns would not be proxied and would ONLY be accessible to authorized IPs.

For this to work you will need the agent's True IP address (which is expensive through Cloudflare) but could be available via a javascript AJAX call in the dynamic portal.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20253
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Support

Who is online

Users browsing this forum: Google [Bot], tantd and 60 guests