返回列表 發帖

【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
  1. opkg update
  2. opkg install openvpn
複製代碼
2. Network configuration

Add a VPN interface to the end of /etc/config/network
  1. config interface 'vpn'
  2.         option proto 'none'
  3.         option ifname 'tun0'
複製代碼
3. Firewall configuration

Add rules to the end of /etc/config/network
  1. config 'rule'
  2.         option 'target' 'ACCEPT'
  3.         option 'dest_port' '1194'
  4.         option 'src' 'wan'
  5.         option 'proto' 'udp'
  6.         option 'family' 'ipv4'

  7. config zone
  8.         option name 'vpn'
  9.         option input 'ACCEPT'
  10.         option forward 'REJECT'
  11.         option output 'ACCEPT'
  12.         option network 'vpn'

  13. config forwarding
  14.         option dest 'lan'
  15.         option src 'vpn'

  16. config forwarding
  17.         option dest 'vpn'
  18.         option src 'lan'
複製代碼
4. Restarting networking and firewall
  1. /etc/init.d/network restart
  2. /etc/init.d/firewall restart
複製代碼

我都很久没有用OpenWRT,所以都没有办法怎样测试。(现在主要用RouterOS)

TOP

不会把,第一个的option是经常用都会出问题! 真的没有想过。CHing厉害。

TOP

返回列表