SSH Tunnel with OpenWrt

Hi .
I have a ZBT WE826-T2 router with EP06-E Module . I install OpenWrt inside router .
I have a Ubuntu VPS and use this server for proxy with SSH Tunnel with command :
ssh -D 80 root@VPS_IP , and set IP Port inside Browser for use .
Is it possible I set VPS IP and SSH user password inside router and OpenWrt to do port forwarding automatically and all router traffic passes through the proxy?
I don't want to manually enter the IP and port on my smartphone or desktop computer. I want all the traffic to pass through the proxy only by connecting to the Wi-Fi network without any other work.
I am a newbie.

Why not use a vpn solution like wireguard? Ssh tunnels can work, but vpns are built for this purpose.

Another solution would be sslh as sni proxy on the VPS, and dnsmasq locally, configured to respond to all queries with the IP of the VPS.

I'm from Iran . government closed more of protocol like PPTP L2TP IKEV2 Wireguard Kerio , ....
None of the protocols work or connect .
just SSH working .

So you can't use https to the VPS, but ssh works ?

This module looks interesting

1 Like

socks and http(s) directly not working .

WireGuard blocked in infrastructure of our country's network , not working .

bummer.

in that case here's a couple examples for auto logon using scripts.

it's a 10 y.o thread, don't expect every solution to be usable today.

I checked , I use SSH tunnel manually now and work fine , I want set SSH inside OpenWrt and just connect to Wi-Fi network and use proxy without set any setting or use other apps.

yes, we know, and that's what the stackoverflow link provides.

if you want to know where to set it up, then that's the question you should be asking, so far, you haven't.

Yes, exactly the question is, where should I set it? Sorry, my English is a little bad

in the local start up script, you can edit it via webui (system -> startup -> 2nd tab)
or vi /etc/rc.local from cli.

make sure you add a delay (sleep) in the script, before executing the ssh command, to avoid race conditions.

your english is just fine.

Thank you, I will test and report the result.

The module in the linked thread changes the wireguard packets to make them not look like wireguard.

Might be worth a shot.

OK Thank you , I will config and test maybe work.

سلام داداش منم دقیقا مشکل تورو دارم ، لطفا بهم پیام بده واتساپ تا اگر مشکل حل شد بهم کمک کنیم ،
۰۹۱۲۲۷۵۰۴۷۶