openwrt上实现Fullcone NAT

最近学习了实现fullconenat的方法,受益匪浅

参考借鉴以下博文及源码,侵删:
https://www.right.com.cn/forum/thread-319827-1-1.html
https://github.com/LGA1150/openwrt-fullconenat

https://github.com/Chion82/netfilter-full-cone-nat
https://blog.chionlab.moe/2018/02/09/full-cone-nat-with-linux/

 

流程个人总结简化如下:
1、进入openwrt源代码目录,安装fullconenat
git clone -b master --single-branch https://github.com/LGA1150/openwrt-fullconenat package/fullconenat

2、打patch(之后即可在/etc/config/firewall中,找到wan对应的zone,新增option fullcon '1'来使能fullconenat)
https://github.com/LGA1150/fullconenat-fw3-patch中的fullconenat.patch放在package/network/config/firewall/patches目录下

3、make menuconfig,在Network > Firewall中勾选iptables-mod-fullconenat,编译烧录镜像

4、insmod xt_FULLCONENAT.ko,并在/etc/config/firewall中,找到wan对应的zone,新增option fullcon '1';reload防火墙

此时利用stun检测nat类型

(stun搭建过程 https://blog.csdn.net/xuzhen5062/article/details/106377911

得到Independent Mapping, Independent Filter,即为fullcone NAT

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值