Can't set route with VPN post script since upgrade to Big Sur
Since upgrading to Big Sur, my VPN post script has not been firing. The VPN to which I connect does not allow split tunneling.
I have a simple script in /etc/ppp/ip-up
that allows me to access things outside of the network while still accessing things in the internal network. It has been working for a while now and ever since upgrading to Big Sur, I have to run the command manually to be able to access external websites/services. It is set to be executable and everything so I don't know what the problem is, below is what that file looks like.
#!/bin/sh
/sbin/route change default 192.168.1.1
If I run the command in Terminal it works, so I'm curious if Apple broke something or changed how it works.
Did something major change with how macOS handles this file?
Solution 1:
Same here ... it was working for a while though.
What seems to work is:
networksetup -setadditionalroutes <networkservice> [ <dest> <mask> <gateway> ]*
To find out the adapter names use:
networksetup -listallnetworkservices
Example:
networksetup -setadditionalroutes "name of your VPN" 192.168.1.0 255.255.255.0 192.168.10.254 192.168.2.0 255.255.255.0 192.168.10.254