【OpenWRT】—— OpenVPN Server for Tun device
本帖最後由 角色 於 2013-11-24 14:13 編輯
Source : http://wiki.openwrt.org/doc/howto/vpn.server.openvpn.tun
1. Installation of OpenVPN package- opkg update
- opkg install openvpn
複製代碼 2. Network configuration
Add a VPN interface to the end of /etc/config/network- config interface 'vpn'
- option proto 'none'
- option ifname 'tun0'
複製代碼 3. Firewall configuration
Add rules to the end of /etc/config/network- config 'rule'
- option 'target' 'ACCEPT'
- option 'dest_port' '1194'
- option 'src' 'wan'
- option 'proto' 'udp'
- option 'family' 'ipv4'
- config zone
- option name 'vpn'
- option input 'ACCEPT'
- option forward 'REJECT'
- option output 'ACCEPT'
- option network 'vpn'
- config forwarding
- option dest 'lan'
- option src 'vpn'
- config forwarding
- option dest 'vpn'
- option src 'lan'
複製代碼 4. Restarting networking and firewall- /etc/init.d/network restart
- /etc/init.d/firewall restart
複製代碼 |