VPN
PPTP
PPTP in LAN not working
LAN 網路的電腦無法連接外網的 PPTP VPN Server
解決:OpenWRT 預設不支援 PPTP 連線,需安裝 kmod-nf-nathelper-extra
。
opkg update
opkg install kmod-nf-nathelper-extra
重啟設備後,重新再試一次。
OpenVPN
OpenVPN Server
Preparation
# Install packages
opkg update
opkg install openvpn-openssl openvpn-easy-rsa luci-app-openvpn luci-i18n-openvpn-zh-tw
Generate Keys
# Configuration parameters
cat << EOF > /etc/profile.d/50-openvpn-easy-rsa.sh
export EASYRSA_PKI="/etc/openvpn"
export EASYRSA_TEMP_DIR=${EASYRSA_TEMP_DIR:-${TMPDIR:-/tmp/}}
export EASYRSA_CERT_EXPIRE="3650"
export EASYRSA_BATCH="1"
EOF
. /etc/profile.d/50-openvpn-easy-rsa.sh
OpenVPN Configuration
- LuCI UI → VPN → OpenVPN → Delete : custom_config/sample_server/sample_client
- LuCI UI → VPN → OpenVPN → Add : Template based configuration
- Name : ovpnServer
- Template : Server configuration for a routed multi-client VPN