10431 questions

12435 answers

19335 comments

21799 members

0 votes
119 views 2 comments
by

Hi, 

I Like to set my Wireguard VPN Configuration with UCI. I know certificated are hard. But if I can set all hostnames, ports, etc.

I can easy login, generate a Private key and are ready to go. Only problem is that after adding, its not visible in the WebUI. 

Do I miss a step? I tried with:

```

uci add network myvpn

uci set network.myvpn.proto='wireguard'

uci set network.myvpn.listen_port='51820'

uci set network.myvpn.addresses='10.0.0.2/32'

uci set network.myvpn.disabled=‘1'
uci set network.myvpn.private_key='xxxxx'  # Generate with button in Webcli 

uci set network.myvpn.public_key='xxxxx='    # Generate with button in Webcli 

uci set network.DO.public_key='xxxxx='

uci set network.DO=wireguard_myvpn

uci set network.DO.allowed_ips='0.0.0.0/0'

uci set network.DO.allowed_ips='::/0'

uci set network.DO.persistent_keepalive='25'

uci set network.DO.endpoint_host={wireGuardHost}

```

I also tried something like this. But both are not visible:

```

uci add network sample

uci set network.@sample[0].proto='wireguard'

uci set network.@sample[0].listen_port='51820'

uci set network.@sample[0].addresses='10.0.0.2/32'

uci set network.@sample[0].disabled='1'

```

1 Answer

0 votes
by
Hi,

Please provide information about what firmware version and device you are using?

Regards,
Ramandeep
by
Hi I am on latest firmware (RUT9_R_00.07.01.4) and the RUT950.

I did also find this post: https://openwrt.org/docs/guide-user/services/vpn/wireguard/client I will check tonight if that flow is possible with Teltonika aswel.
by

I've tested on RUT950 with latest firmware version (RUT9_R_00.07.01.4) and configurations do appeared on the WebUI. Please do not forget to enable the Wireguard interface with the below UCI command:

uci set network.myvpn.disabled="0"
uci commit network
/etc/init.d/network restart

For both Wireguard server and client configurations using UCI, please follow the links below (as I've used the same source defined by you in the above comment):
https://openwrt.org/docs/guide-user/services/vpn/wireguard/server
https://openwrt.org/docs/guide-user/services/vpn/wireguard/client

Regards,
Ramandeep