[Solved] OpenVPN server & client

Hello everyone!

I have OpenWrt 21.02.3 installed and I have configured openvpn client which use device tun0.
Right now I want to have there an openvpn server as well, but tun0 is already been taken for outgoing vpn connection.

Is it possible to configure openvpn server on openwrt if I already used it as openvpn client?
If yes, how can I add another tun device so I can use it for openvpn server?
Thank you.

Yes, it is possible. Use tun1.

1 Like

I don't have it. When I try to create it from web the only option I have is to use alias for tun0. I assume it is not correct.
How to create it? :slight_smile:

Isn't there a dev tunX line in the .ovpn file?

I'm following this article: https://openwrt.org/docs/guide-user/services/vpn/openvpn/server

So probably I should skip this part:

uci del_list firewall.lan.device="tun+"

and just do:

uci add_list firewall.lan.device="tun1"

Is that correct?

Yes, that would be correct if your OpenVPN client interface is tun0 and the server interface is tun1.

That worked, thank you

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

Okay. Thank you.

the only thing is that openvpn after configuring everything is using tun0 for server and tun1 for client. So I have to change bindings for lan/wan.

This is not a problem. You can statically assign them in the ovpn conf files and then use these from now on.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.