openwrt vpn防火墙设置

本文介绍openwrt安装企业办公内网openvpn的技术文章。

由于公司云服务器除80、443端口外,其他端口均不提供公网IP访问,仅能通过内网IP进行访问,因此办公室路由器需配置OpenWRT的OpenVPN客户端以连接到云VPN网关。然而,在成功建立OpenVPN连接后,发现路由器可以正常访问,但办公电脑却无法通过VPN路由进行访问。经过检查,发现这是由于OpenWRT防火墙限制所致。为解决此问题,需对firewall进行相应配置,以确保办公电脑能够通过VPN通道进行访问。

  1. Navigate to Network > Interface
  2. Click on Add New Interface在这里插入图片描述

Enter the details as below:

  1. Name of the new interface: PureVPN

  2. The protocol of the new interface: select Unmanaged from the drop-down menu

  3. Cover the following interface: Custom Interface – tun0
    在这里插入图片描述

  4. Click Create interface.

Set Firewall Rule for VPN connection.

  1. Navigate to Network > Firewall
  2. Click Add.

在这里插入图片描述

Configure the firewall as below.

  1. Name: Pure_fw
  2. Input: reject
  3. Output: accept
  4. Forward: reject
  5. Masquerading: Checked
  6. MSS clamping: Checked
  7. Covered networks: Select PureVPN
  8. Select Allow forward from source zones
    lan: Checked
    wifi: Checked(if you have wifi interface configured)
  9. Once that is done, click on Save.
    在这里插入图片描述
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值