-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Configure via LuCI on OpenWRT
If the default client_up.sh
and client_down.sh
won't work on your OpenWRT router,
and you couldn't figure out why, use LuCI to configure instead.
-
Clear the content of
client_up.sh
andclient_down.sh
so that they won't change route table any more. Remove/etc/hotplug.d/iface/30-shadowvpn
if it exists. Then start ShadowVPN. -
Add a new interface named
tun
, selecttun0
. -
Disable
Use default gateway
of wan. -
Add a new zone called tun. Add
interface tun
totun zone
. And update forward rules:lan => tun
,tun => wan
. -
Add two static routes
If your wan is pppoe, you only need to specify the interface wan in the first rule. If your wan is static IP or DHCP, you also have to specify gateway IP.
-
(Optional) Add chnroutes script. Save it to
/etc/shadowvpn/chnroutes.sh
. Thenchmod +x /etc/shadowvpn/chnroutes.sh
Create
/etc/hotplug.d/iface/35-chnroutes
#!/bin/sh [ ifup = "$ACTION" ] && { [ wan = "$INTERFACE" ] && { /etc/shadowvpn/chnroutes.sh } }
-
Save and apply. Then:
/etc/init.d/network restart
To disable ShadowVPN, go to step 5 and change default route 0.0.0.0 from tun to wan.