本文介绍openwrt安装企业办公内网openvpn的技术文章。
因公司云服务器除了443端口外不提供公网IP访问,只能通过内网IP访问,所以办公室路由器openwrt 配置openvpn client连接公司云服务器vpn网关后才能访问,发现openvpn连接成功后,路由器能访问,但办公电脑无法走vpn路由,发现是防火墙限制,通过配置firewall,才能实现办公电脑走vpn通道。
- Navigate to Network > Interface
- Click on Add New Interface
Enter the details as below:
-
Name of the new interface: PureVPN
-
The protocol of the new interface: select Unmanaged from the drop-down menu
-
Cover the following interface: Custom Interface – tun0
-
Click Create interface.
Set Firewall Rule for VPN connection.
- Navigate to Network > Firewall
- Click Add.
Configure the firewall as below.
- Name: Pure_fw
- Input: reject
- Output: accept
- Forward: reject
- Masquerading: Checked
- MSS clamping: Checked
- Covered networks: Select PureVPN
- Select Allow forward from source zones
lan: Checked
wifi: Checked(if you have wifi interface configured) - Once that is done, click on Save.