How to share VPN internet with OpenWrt

What do you mean?

I may be wrong at all.
Do you please help me how can I share internet with VPN?
Now when I search my ip, it shows my dynamic IP for the internet.
But I want to show my public IP of my_server.

Ssh is creating tunnels not VPNs, if you want proper VPN, set up wireguard.

Does you server have a public IP?

But I think you need openssh-client on your router, but it's only a guess, since you're not answering the questions...

Ssh, is creating tunnels not VPNs

Yes, but I create socks using ssh and do my stuffs in my laptop.
I want to run that in my router and openwrt, so there would be no need to run ssh command for each device separately..

Does you server have a public IP?


since you're not answering the questions

Sorry, I did not get you mean completely. Could you please rephrase them?

But I think you need openssh-client on your router, but it's only a guess

I installed this now and it's working with ssh -D, but my problem is not solved unfortunately.

Still don't know what the problem is exactly, so your guess is as good as mine...

But I would guess -D only binds to localhost, by default?

OK, this is what I do in my laptop to have SSH Tunnels to use socks proxy in my laptop:

I run ssh -D1111 root@my_server -pPort and then use localhost as hostname in Firefox, and Port 1111 for it. So when I search my ip in google in Firefox, it shows my server's public IP.
There are around 10 PCs which should separately do this to have my_server's IP to access some websites.

Now I want to run a VPN on my router, so that all those 10 PCs only connect to router with no further configurations in the OS.

Now I want to do the

It's configurable.

ssh -D root@server -pPort
You can change to other IPs for listening.

That's why my post said by default...

How is this

related to


I mean I want my router has a socks proxy as it can be done with SSH Tunneling,.

Then read the thread @lleachii linked to.

1 Like

I read that and I did it.
But still when I connect to my router, my_server's IP is not shown to me.

No idea what that means, you keep talking in riddles.

1 Like

I did that (as there was no difference with what I've been trying to do), but still my wireless has normal IP, not my server's IP.

Still don't understand what you're trying to do, so your on your own...

But your wireless' IP will never change, proxy, or not.

1 Like

Some websites like YouTube is banned in my country, and I should have VPN to open YT.
So in this case, I should have VPN client apps in my mobile, 10PCs, my laptop and each device to be able to watch YT videos.

Now I want to have a VPN client (or with SSH Tunneling) in my router (openwrt device), so that when everyone connects to my router wireless, he can open YT fine without any VPN enabled on his device individually.

I hope this clarification reached to the point.

Then set up a VPN client on the router, assuming you have something to connect it to.


Thanks, but I think I cannot clarify well, or you may not get my point because you live in a country that does not have any restrictions for accessing internet:(

I'm from Iran and when I use an ADSL or Mobile Data, some websites like YouTube or even WhatsApp and Telegram are banned by the government and I cannot access that.
So I need to purchase a VPS from another country and tunnel to that server, so that I can access those sites.

I have an office with 10 people and I should set socks proxy for each of them by PuTTy application.
Now I decided to purchase a router (alongside with ADSL modem) and set socks proxy in my router so that when my people connect to router, their valid IP changes from Iranian IP to German IP.

Now by these talks, is there a simple, or even a hard, way to do that?

Information here. You would do that with the VPS.

Iran bans almost all kinds of VPNs.
I also tried installing OpenVPN, but my router has 9MB space and OpenVPN requires more space.

Would you please help me which kind of VPN I can use to see if it works in Iran?