Skip to content
Import list of IP addresses to bypass
Got a problem with Viscosity or need help? Ask here!
-
patrikr
- Posts: 2
- Joined: Fri Feb 16, 2024 4:05 am
Post
by patrikr » Fri Feb 16, 2024 4:08 am
Is there a way to import a list of IP addresses from a TXT file and automatically add them to bypass the VPN (when using Full Tunnel)? For example, I use full tunnel all the time but would like to bypass Zoom calls to go straight out instead of going through the OpenVPN tunnel. The list of ranges to bypass is available here:
https://assets.zoom.us/docs/ipranges/Zoom.txt
https://assets.zoom.us/docs/ipranges/Zoom.txt
-
James
- Posts: 2376
- Joined: Thu Sep 04, 2008 9:27 pm
Post
by James » Fri Feb 16, 2024 4:48 am
Hi patrikr,
You can convert them to OpenVPN syntax, and then add them to the advanced commands area for your connection.
For example, the first IP range ("3.7.35.0/25") in the txt file would become:
You don't need to perform the conversion each time. For example, once you know that "/25" = "255.255.255.128", just do a find-all-replace in your text editor of choice and replace all occurrences of "/25" with " 255.255.255.128" (note the extract space). Repeat for the other CIDR values (it looks like most are /26 or /27).
Once you have your text document of commands, just copy-paste it into the advanced commands area for your connection, and then click Save:
https://www.sparklabs.com/support/kb/ar ... n-commands
Cheers,
James
You can convert them to OpenVPN syntax, and then add them to the advanced commands area for your connection.
For example, the first IP range ("3.7.35.0/25") in the txt file would become:
Code: Select all
The second IP range ("3.21.137.128/25") would become:
route 3.7.35.0 255.255.255.128 net_gateway
Code: Select all
You can use a text editor's find/replace syntax to insert the route command and net_gateway parameter on each line without having to do it by hand. The tricky bit however is converting the CIDR notation (that's the "/25" part in the above examples) to the netmask notation that OpenVPN expects (that's the "255.255.255.128" part). If you do an internet search for "cidr to netmask calculator" you'll find plenty of web tools that will do the conversion for you.route 3.21.137.128 255.255.255.128 net_gateway
You don't need to perform the conversion each time. For example, once you know that "/25" = "255.255.255.128", just do a find-all-replace in your text editor of choice and replace all occurrences of "/25" with " 255.255.255.128" (note the extract space). Repeat for the other CIDR values (it looks like most are /26 or /27).
Once you have your text document of commands, just copy-paste it into the advanced commands area for your connection, and then click Save:
https://www.sparklabs.com/support/kb/ar ... n-commands
Cheers,
James
Web: https://www.sparklabs.com
Support: https://www.sparklabs.com/support
Bluesky: https://bsky.app/profile/sparklabs.com
Support: https://www.sparklabs.com/support
Bluesky: https://bsky.app/profile/sparklabs.com
-
patrikr
- Posts: 2
- Joined: Fri Feb 16, 2024 4:05 am
Post
by patrikr » Fri Feb 16, 2024 7:35 am
OK makes sense. Shouldn't be too difficult. I might create a simple Python script to do this and if so, I'll share it here for others to use.
3 posts
Page 1 of 1