I use an ESP32 with a web server in my network. I can setup Wifi and IP adress without problems, but my ESP32 is not reachable by my VPN connection. The reason is, that I use a dedicated VPN server which is not located on my gateway/router to the internet. When I connect to my network using VPN I need to add a new static route on my servers I want to access. On linux I use:
route add -net 10.5.5.0 netmask 255.255.255.0 gateway 192.168.0.14
To add a route to my VPN server.
How can I add a static route in my ESP32 sketch?