SOCKS5 Tunnelling from an iPad using an SSH client over a cellular connection while already connected to a VPN. Can this be done in iOS in 2024 or should I just give up?
Ok here goes.
I have an iPad mini 6 with a cell connection running iOS 17.4.1.
From the cellular network/internet, I am connecting to my external firewall via an OpenVPN tunnel.
Now, via the internal virtual IP from the VPN, I am connecting to a host on the inside of my LAN firewall using an SSH tunnel through a bastion host at the 'front door' of my LAN firewall. In an SSH config file this would be considered proxyjump, or -J from an ssh command if that helps make sense of my description.
From that host on the inside of the LAN firewall, I would like to use a SOCKS5 proxy to access web servers on that network. I would also settle for stable port forwards if that's the only solution. I've tested a bunch of SSH clients from the ios app store and narrowed those down by weening out the majority that don't get as far as supporting the proxyjump/bastion host part.
Out of those apps, the ones that also appear to support socks5 tend to provide a .pac file to the apps url and inside of that is localhost and port number. I don't think there is anywhere to input a URL to a .pac for the cellular connection in iOS for some reason/unfortunately. And I'm not certain this would even work on the wifi network to be honest. What a hassle anyhow. What if you want to use that wifi network normally? Then you're writing some brutal .pac files to filter hosts etc etc etc.
I don't have this problem with other civilized posix compliant OS's, or droids (JuiceSSH is king), and I can even get it working in the lands of the savage redmond fisher price no probalo. Don't get me started with those weirdo zuners though.
Anyhow, the SOCKS5 tunnel aside, I have managed to get this working with port forwards but usually those connections don't last more than 15 seconds without timing out. Maybe I'm overthinking all of this and there's something like a keepalive command I can jam into some config file in this chain that will save my port forwards?
Anyhow, any other device/OS I use seems to be able to be connected to a VPN while simultaneously sending traffic through a SOCKS5 tunnel over an ssh connection via a bastion host without even breaking a sweat. Why is this so complicated/inconvenient/unachievable using an ios device?