找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
楼主: LGA1150

[12/8更新]OpenWrt 上实现 NAT1 (Full cone NAT) 的方法,无需 DMZ/UPnP

 火... [复制链接]
发表于 2018-12-19 10:24 | 显示全部楼层
LGA1150 发表于 2018-12-19 02:33
内核日志有没有错误或警告 @esdeblt

xt_FULLCONENAT: warning: failed to register a conntrack notifier. Disable active GC for mappings.
是这个问题吗

点评

你没有打上那个 952 开头的内核补丁吧  详情 回复 发表于 2018-12-19 12:28
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-12-19 12:28 来自手机 | 显示全部楼层
esdeblt 发表于 2018-12-19 10:24
xt_FULLCONENAT: warning: failed to register a conntrack notifier. Disable active GC for mappings.
...

你没有打上那个 952 开头的内核补丁吧

点评

[attachimg]260775[/attachimg] 打好952补丁重新编译了固件,好象还是不行  详情 回复 发表于 2018-12-19 14:12
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-12-19 14:12 | 显示全部楼层
LGA1150 发表于 2018-12-19 12:28
你没有打上那个 952 开头的内核补丁吧


打好952补丁重新编译了固件,好象还是不行

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×

点评

是不是还要把测试软件加入防火墙名单呢?  详情 回复 发表于 2018-12-19 14:30
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-12-19 14:30 | 显示全部楼层
本帖最后由 LGA1150 于 2018-12-19 14:37 编辑
esdeblt 发表于 2018-12-19 14:12
打好952补丁重新编译了固件,好象还是不行

是不是还要把测试软件加入防火墙名单呢?你也可以换一个服务器测试,如 stun.miwifi.com

点评

[attachimg]260797[/attachimg] OK了,不知道为什么关防火墙不行,加白名单就可以了  详情 回复 发表于 2018-12-19 15:17
[attachimg]260789[/attachimg] 我直接把防火墙退了,还是一样  详情 回复 发表于 2018-12-19 15:01
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-12-19 15:01 | 显示全部楼层
LGA1150 发表于 2018-12-19 14:30
是不是还要把测试软件加入防火墙名单呢?你也可以换一个服务器测试,如 stun.miwifi.com


我直接把防火墙退了,还是一样

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-12-19 15:05 | 显示全部楼层
我只有WIN10的默认防火墙,没安装第三方防火墙
退了防火墙裸奔也不行,还有一台装了360的WIN7电脑,退了360跑也是一样
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-12-19 15:17 | 显示全部楼层
LGA1150 发表于 2018-12-19 14:30
是不是还要把测试软件加入防火墙名单呢?你也可以换一个服务器测试,如 stun.miwifi.com


OK了,不知道为什么关防火墙不行,加白名单就可以了

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-12-19 15:21 | 显示全部楼层
多谢楼主的热心解答,我去编译带插件的固件测试
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-12-19 18:52 来自手机 | 显示全部楼层
小白一問,如果用了full cone Nat,對網絡安全性會不會有影響?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-12-20 14:15 | 显示全部楼层
这个要支持,回去试试
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-1-4 19:10 | 显示全部楼层
本帖最后由 eviright 于 2019-1-4 20:08 编辑

编译固件通过,记录一下
Vultr 新加坡机房(按时计费,可以选台性能高一点的机器,用完就destroy
Ubuntu 18.10 x64
非root用户
依赖:
sudo apt-get update -y
sudo apt-get install -y build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils autoconf automake libtool autopoint

openwrt:
master分支
git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a


git clone -b master --single-branch https://github.com/LGA1150/openwrt-fullconenat package/fullconenat
make menuconfig
# Select Network -> Firewall -> iptables-mod-fullconenat

luci-Patch那块不知道为什么编译就报错

make V=s(不能加 -j 参数,一定报错



我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-1-4 20:10 | 显示全部楼层
Applying ./patches/fullconenat.patch using plaintext:
patching file options.h
patching file zones.c
Hunk #2 succeeded at 711 (offset 4 lines).

Applying ./patches/fullconenat.patch.1 using plaintext:
patching file options.h
Hunk #1 succeeded at 343 with fuzz 2 (offset 2 lines).
patching file zones.c
Hunk #1 succeeded at 79 with fuzz 2 (offset 2 lines).
Hunk #2 FAILED at 707.
1 out of 2 hunks FAILED -- saving rejects to file zones.c.rej
Patch failed!  Please fix ./patches/fullconenat.patch.1!
make[3]: *** [Makefile:69: /home/openwrt/openwrt/build_dir/target-mips_24kc_musl/firewall-2019-01-02-70f8785b/.p                               repared_f4a1398948f0ce2a1bebd9f9fbd2e341_6664517399ebbbc92a37c5bb081b5c53] Error 1
make[3]: Leaving directory '/home/openwrt/openwrt/package/network/config/firewall'
time: package/network/config/firewall/compile#0.24#0.06#0.28
make[2]: *** [package/Makefile:109: package/network/config/firewall/compile] Error 2
make[2]: Leaving directory '/home/openwrt/openwrt'
make[1]: *** [package/Makefile:103: /home/openwrt/openwrt/staging_dir/target-mips_24kc_musl/stamp/.package_compi                               le] Error 2
make[1]: Leaving directory '/home/openwrt/openwrt'
make: *** [/home/openwrt/openwrt/include/toplevel.mk:218: world] Error 2

这是加了patch之后make V=s的结果

点评

有一个多余的 patch.1 ,全删掉重下  详情 回复 发表于 2019-1-4 20:15
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-1-4 20:15 | 显示全部楼层
eviright 发表于 2019-1-4 20:10
Applying ./patches/fullconenat.patch using plaintext:
patching file options.h
patching file zones. ...

有一个多余的 patch.1 ,全删掉重下

点评

删除补丁 git checkout package/network/config/firewall pushd feeds/luci rm -vf applications/luci-app-firewall/luasrc/model/cbi/firewall/*.{rej,orig} git checkout applications/luci-app-firewall/luas  详情 回复 发表于 2019-1-4 20:30
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-1-4 20:30 | 显示全部楼层
LGA1150 发表于 2019-1-4 20:15
有一个多余的 patch.1 ,全删掉重下

删除补丁
git checkout package/network/config/firewall
pushd feeds/luci
rm -vf applications/luci-app-firewall/luasrc/model/cbi/firewall/*.{rej,orig}
git checkout applications/luci-app-firewall/luasrc/model/cbi/firewall
popd

git status 再删除 package/network/config/firewall/patches/
重新Patch
mkdir package/network/config/firewall/patches
wget -P package/network/config/firewall/patches/ https://github.com/LGA1150/fullc ... r/fullconenat.patch
wget -O- https://github.com/LGA1150/fullc ... ster/Makefile.patch | patch -p1
pushd feeds/luci
wget -O- https://github.com/LGA1150/fullc ... w/master/luci.patch | patch -p1
popd

make V=s

这次成功了,谢谢LZ,一会刷固件看看效果
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-1-5 13:46 | 显示全部楼层
本帖最后由 eviright 于 2019-1-5 13:55 编辑

似乎发生了很奇怪的事情
Switch原先校园网Nat Type是D
开启Full Cone之后掉到了F



而且关闭这个选项会变成UDPBlocked已关闭ESET防火墙(ESET接管系统防火墙





实在是懵逼

点评

你路由器是公网 IP 吗?路由器之外的 NAT 是控制不了的 另外,Masquerade 不能关,关了你就上不了网  详情 回复 发表于 2019-1-5 14:25
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-24 09:50

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表