Skip to content

Instantly share code, notes, and snippets.

@marcelrv
Last active July 24, 2023 13:37
Show Gist options
  • Save marcelrv/586b9c3ae2519d308c940d4bb16f6bef to your computer and use it in GitHub Desktop.
Save marcelrv/586b9c3ae2519d308c940d4bb16f6bef to your computer and use it in GitHub Desktop.
Wireguard clients config

https://openwrt.org/docs/guide-user/services/vpn/wireguard/client

OpenWRT install wireguard client


opkg update
opkg install wireguard-tools
opkg install luci-proto-wireguard
opkg install luci-app-wireguard 
opkg install luci-i18n-wireguard-en

OpenWRT Allow SSH through WAN port

uci add firewall rule
uci set firewall.@rule[-1].name='Allow-SSH-from-WAN'
uci set firewall.@rule[-1].src=wan
uci set firewall.@rule[-1].target=ACCEPT
uci set firewall.@rule[-1].proto=tcp
uci set firewall.@rule[-1].dest_port=22
uci commit firewall
/etc/init.d/firewall restart

OpenWRT Allow webclient through WAN port

uci add firewall rule
uci set firewall.@rule[-1].name='Allow-luci-from-WAN'
uci set firewall.@rule[-1].src=wan
uci set firewall.@rule[-1].target=ACCEPT
uci set firewall.@rule[-1].proto=tcp
uci set firewall.@rule[-1].dest_port=80
uci commit firewall
/etc/init.d/firewall restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment