Wanna connect an OpenBSD machine to mobile internet via Android smartphone USB tethering.
doas dhclient urndis0
With my previous mobile provider it worked fine, now I have had to move and switch provider. With this one, when I tether, I can successfully ping from BSD but no http/ftp stuff opens, e.g.:
> curl -L unitedbsd.com
curl: (56) Recv failure: Connection reset by peer
And sometimes soon after I try it an SMS comes "buy internet sharing".
On the internet, they say that providers distinguish OSes by TTL (= time to live) so you need to set TTL to the same value as Android's which is 64, but on OpenBSD it is already 64:
> sysctl net.inet.ip.ttl
net.inet.ip.ttl=64
They on the internet also say you might need to connect via VPN in order to hide your non-Android traffic (e.g. when Windows fetches its updates they see it can't be Android and block you). But VPN also doesn't connect - I tried with freeopenvpn.org service:
doas openvpn --config /path/to/USA_freeopenvpn_tcp.ovpn
doas openvpn --config /path/to/USA_freeopenvpn_udp.ovpn
It does work for me when on Wi-Fi, but neither works vie tethering:
Enter Auth Username:freeopenvpn
Enter Auth Password:
2023-03-19 15:55:06 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
2023-03-19 15:55:06 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
2023-03-19 15:55:06 TCP/UDP: Preserving recently used remote address: [AF_INET]85.239.52.173:12352
2023-03-19 15:55:06 UDP link local: (not bound)
2023-03-19 15:55:06 UDP link remote: [AF_INET]85.239.52.173:12352
2023-03-19 15:55:11 Server poll timeout, restarting
2023-03-19 15:55:11 SIGUSR1[soft,server_poll] received, process restarting
2023-03-19 15:55:11 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
2023-03-19 15:55:11 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
2023-03-19 15:55:11 TCP/UDP: Preserving recently used remote address: [AF_INET]85.239.52.173:12352
2023-03-19 15:55:11 UDP link local: (not bound)
2023-03-19 15:55:11 UDP link remote: [AF_INET]85.239.52.173:12352
2023-03-19 15:55:16 Server poll timeout, restarting
2023-03-19 15:55:16 SIGUSR1[soft,server_poll] received, process restarting
2023-03-19 15:55:16 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
2023-03-19 15:55:16 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
2023-03-19 15:55:17 TCP/UDP: Preserving recently used remote address: [AF_INET]85.239.52.173:12352
2023-03-19 15:55:17 UDP link local: (not bound)
2023-03-19 15:55:17 UDP link remote: [AF_INET]85.239.52.173:12352
2023-03-19 15:55:22 Server poll timeout, restarting
2023-03-19 15:55:22 SIGUSR1[soft,server_poll] received, process restarting
and so on - loop of process restarting