Files
qmi-cloud/server/vpn.js
2025-03-12 11:30:39 +01:00

178 lines
3.2 KiB
JavaScript

const ipRangeCheck = require("ip-range-check");
const ALLOWED_VPN_IPS = process.env.ALLOW_VPN_IPS? process.env.ALLOW_VPN_IPS.split(",") : [
/* Locations used by VPN
FortiClient Qlik AMER: Peak 10
FortiClient Qlik EMEA: Azure West EU
FortiClient Qlik APAC: Azure SE Asia
FortiClient Qlik Israel: Bezeq International
FortiClient Qlik AMER Full Tunnel: EdgeConneX
FortiClient Qlik EMEA Full Tunnel: ITG
GlobalProtect France-Paris-PA7 DC: PA7
GlobalProtect India Bangalore: Bangalore
GlobalProtect US-SantaClara-SV2 DC: SV2 */
//Amsterdam
"87.215.26.80/30",
"213.19.160.248/29",
//Azure East US
"20.169.241.157/32",
"52.249.189.36/30",
//Azure SE Asia
"4.194.213.114/32",
"13.67.39.84/30",
"52.163.112.12/32",
//Azure West EU
"20.67.110.204/30",
"20.160.170.99/32",
"51.124.216.148/32",
//Bangalore
"14.97.166.192/29",
"14.97.167.20/30",
"122.185.123.60/30",
"182.79.10.24/29",
//Barcelona
"213.249.118.192/29",
"217.111.236.72/29",
//Beijing
"60.247.114.144/28",
//Bezeq International
"84.110.174.176/29",
"194.90.96.176/29",
"213.57.84.160/29",
//Boston
"4.31.157.72/29",
"160.72.228.184/29",
//Brussels
"62.72.113.248/29",
//Canberra
"194.193.33.92/30",
"203.54.177.108/30",
//Dubai
"5.32.13.160/29",
"91.74.64.88/30",
//EdgeConneX
"50.239.179.0/29",
"144.121.57.96/28",
//Gothenburg
"62.84.210.176/29",
"80.169.23.152/29",
//Hong Kong
"113.28.150.136/29",
"157.120.224.72/29",
//ITG
"188.65.156.32/28",
"188.65.156.64/26",
"188.65.157.0/24",
"212.73.252.96/29",
//King of Prussia
"4.7.75.104/29",
"50.196.32.120/29",
"144.121.150.64/29",
//London
"213.19.205.200/29",
"213.86.16.48/29",
//Lund
"193.15.228.244/30",
//Melbourne
"59.100.255.132/30",
"210.23.152.248/30",
//Milan
"82.112.207.120/29",
"213.249.127.192/29",
//Munich
"62.67.24.152/29",
"87.191.17.104/29",
//Nantes
"81.255.115.32/29",
"84.14.92.152/29",
//New York
"144.121.205.232/29",
"216.158.140.240/29",
//Ottawa
"4.16.48.64/29",
"172.110.70.104/29",
//PA7
"217.117.156.84/30",
"217.117.156.140/30",
"217.117.156.160/27",
//Peak 10
"4.4.97.104/29",
"72.15.192.80/28",
"206.196.17.32/27",
//Salt Lake City
"67.148.246.64/29",
"208.185.177.232/31",
//Sao Paulo
"200.143.76.220/30",
"200.186.98.152/29",
//Singapore
"66.96.221.184/29",
"113.29.111.232/29",
//Suresnes
"62.23.50.120/29",
//SV2
"4.31.193.68/30",
"4.79.217.0/25",
"149.97.160.216/30",
"149.97.160.220/30",
"149.97.185.0/27",
//Sydney
"110.175.244.64/29",
"113.29.116.192/29",
//Tokyo
"8.244.136.32/29",
"67.220.128.192/29",
//Vadodara
"113.212.86.40/29",
"202.160.161.208/29",
//Vicenza
"212.3.233.168/29",
"213.254.239.32/29",
//Winnersh
"89.197.129.216/29",
"217.163.97.32/29",
];
module.exports.isQlikVPN = function(ip) {
return ipRangeCheck(ip, ALLOWED_VPN_IPS);
}