wiseelf
November 23, 2022, 11:10am
1
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.
trendy
November 23, 2022, 11:11am
2
Yes, it is possible. Use tun1
.
1 Like
wiseelf
November 23, 2022, 11:23am
3
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?
trendy
November 23, 2022, 11:36am
4
Isn't there a dev tunX
line in the .ovpn file?
wiseelf
November 23, 2022, 11:38am
5
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?
trendy
November 23, 2022, 11:45am
6
Yes, that would be correct if your OpenVPN client interface is tun0 and the server interface is tun1.
trendy
November 23, 2022, 2:23pm
8
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.
wiseelf
November 23, 2022, 2:28pm
9
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.
trendy
November 23, 2022, 2:39pm
10
This is not a problem. You can statically assign them in the ovpn conf files and then use these from now on.
tmomas
Closed
December 3, 2022, 2:40pm
11
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.