首页 > 其他分享 >openwrt nat失败排查

openwrt nat失败排查

时间:2023-01-31 22:31:30浏览次数:32  
标签:iptables 120.1 destination tcp 排查 192.168 nat openwrt

之前使用openwrt开启nat,就是在防火墙的端口转发中添加了samba服务的端口转发规则,结果发现不行,后来发现需要添加如下的自定义规则才行。

​iptables -t nat -I PREROUTING -i eth0.2-p tcp -dport 135 -j DNAT --to-destination 192.168.120.1:135 ​

​iptables -t nat -I PREROUTING -i eth0.2-p tcp -dport 136 -j DNAT --to-destination 192.168.120.1:136 ​

​iptables -t nat -I PREROUTING -i eth0.2-p tcp -dport 137 -j DNAT --to-destination 192.168.120.1:137 ​

​iptables -t nat -I PREROUTING -i eth0.2-p tcp -dport 138 -j DNAT --to-destination 192.168.120.1:138 ​

​iptables -t nat -I PREROUTING -i eth0.2-p tcp -dport 139 -j DNAT --to-destination 192.168.120.1:139 ​

​iptables -t nat -I PREROUTING -i eth0.2-p tcp -dport 445 -j DNAT --to-destination 192.168.120.1:445​

标签:iptables,120.1,destination,tcp,排查,192.168,nat,openwrt
From: https://blog.51cto.com/mayuenjkxt/6029905

相关文章

  • Virtual Box配置NAT网络未指定NAT网络名称
    一、问题虚拟机想要新增NAT网络,发现网络接口无效,提示未指定NAT网络名称。  二、问题解决2.1 管理-全局设定-网络,新增nat网络     三、问题解决......
  • 记一次线上FGC问题排查
    引言本文记录一次线上GC问题的排查过程与思路,希望对各位读者有所帮助。过程中也走了一些弯路,现在有时间沉淀下来思考并总结出来分享给大家,希望对大家今后排查线上GC问......
  • 记一次线上FGC问题排查
    引言本文记录一次线上GC问题的排查过程与思路,希望对各位读者有所帮助。过程中也走了一些弯路,现在有时间沉淀下来思考并总结出来分享给大家,希望对大家今后排查线上GC问......
  • react native启动时报错Could not resolve com.facebook.react:react-native:+
    启动项目是报错大致如下:解决这个issue已经给出了解决方法https://github.com/facebook/react-native/issues/35210rn>=0.63rn官方为大于0.63的所有主要版本都准......
  • react native启动项目报错Received status code 403 from server: Forbidden
    问题:启动项目时报错如下图:解决:点击报错中的.xml链接,浏览器中可以正常下载,意识到大概率是代理的问题。国内开发环境一直是一个比较大问题,开发得一直连着代理,需要去an......
  • 记一次nginx频繁报502的问题排查
    在服务器所需应用(LNMP)全部安装完毕后,在执行脚本时,发现总是在执行了30秒之后,会报recv()failed(104:Connectionresetbypeer)whilereadingresponseheaderfromupstr......
  • Oracle存储过程打印输出错误信息、行号,快速排查
    本文转载自https://blog.csdn.net/lw112190/article/details/128268465 感谢博主 天天代码码天天 热心分享测试存储过程如下:createorreplaceprocedureprc_testi......
  • openwrt内核模块怎样解决哈希依赖问题
    openwrt内核模块怎样解决哈希依赖问题 来源 https://forum.gl-inet.cn/forum.php?mod=viewthread&tid=1032&extra=page%3D1参考 https://forum.gl-inet.cn/forum.php?......
  • 水管有时会嗡嗡响之水管共振问题 和如何排查
    “  我是4楼住户,最近用水洗澡时,水管有时会嗡嗡响,然后水压就降低了,想想也许时其他楼层用抽水泵加压,也就没在意。这几天问题越来越严重,一天响个几次。现在大过年的半夜,又响......
  • 在spring boot3中使用native image
    简介在之前springboot3文章中我们介绍了,springboot3的一个重要特性就是支持把springboot3的应用编译成为GraalVM的NativeImage。今天我们用具体的例子来给大家演示一......