找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 3812|回复: 7

破解贝尔光猫登陆telnet怎么用ip6tables修改ipv6防火墙?

[复制链接]
光猫是:贝尔E140WP,
碰到的问题是:光猫获得ipv6下发成功,内网也能分配ipv6,但是光猫内置的防火墙太严了,只出不进。而且ipv6层面防火墙连配置页面都没有,不像ipv4防火墙,还有虚拟主机啦,dmz啦,等几个页面能够配置。本来就想ipv6都有了,再也不用内网穿透了,可以直接从外网(比如手机4g连入内网服务,用ipv6+ddns)直接访问内网ipv6地址了,可惜这防火墙太碍事。但是也不敢全部关闭。万一有人恶意扫描端口可挡不住。

结果:希望直接在光猫ipv6防火墙上直接开一条或者多条规则。

研究了一天,终于用telnet登陆了光猫控制台。进linuxshell。ip6tables命令列出目前的配置,看了一下,看不懂,似乎forward链上有哪条规则在起作用,挡掉了进站数据?!

哪位老师请看看,即使手工加规则,该如何写?


# ip6tables
ip6tables v1.4.16.3: no command specified
Try `ip6tables -h' or 'ip6tables --help' for more information.
# ip6tables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
in_mcast   all      anywhere             anywhere
in_anti_scan  all      anywhere             anywhere
in_anti_dos  all      anywhere             anywhere
in_app     all      anywhere             anywhere
in_ip_filter_in  all      anywhere             anywhere
in_acl     all      anywhere             anywhere
in_firewall  all      anywhere             anywhere

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
fwd_url_ctl  tcp      anywhere             anywhere             tcp flags:FIN,SYN,RST/NONE
fwd_anti_dos  all      anywhere             anywhere
fwd_mcast  all      anywhere             anywhere
fwd_virtual_server  all      anywhere             anywhere
fwd_app    all      anywhere             anywhere
fwd_ip_filter_in  all      anywhere             anywhere
fwd_ip_filter_out  all      anywhere             anywhere
fwd_firewall  all      anywhere             anywhere
fwd_wan_conn  all      anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain fwd_anti_dos (1 references)
target     prot opt source               destination

Chain fwd_app (1 references)
target     prot opt source               destination

Chain fwd_firewall (1 references)
target     prot opt source               destination
ACCEPT     all      anywhere             anywhere             state RELATED,ESTABLISHED
LOG        tcp      anywhere             anywhere             tcp flags:FIN,SYN,RST,ACK/SYN limit: avg 6/hour burst 5 LOG level alert prefix "Intrusion -> "
DROP       all      anywhere             anywhere

Chain fwd_ip_filter_in (1 references)
target     prot opt source               destination

Chain fwd_ip_filter_out (1 references)
target     prot opt source               destination

Chain fwd_mcast (1 references)
target     prot opt source               destination

Chain fwd_url_ctl (1 references)
target     prot opt source               destination

Chain fwd_url_filter (0 references)
target     prot opt source               destination

Chain fwd_virtual_server (1 references)
target     prot opt source               destination

Chain fwd_wan_conn (1 references)
target     prot opt source               destination
TCPMSS     tcp      anywhere             anywhere             tcp flags:SYN,RST/SYN TCPMSS clamp to PMTU

Chain in_acl (1 references)
target     prot opt source               destination
DROP       tcp      anywhere             anywhere             tcp dpt:ftp
DROP       udp      anywhere             anywhere             udp dpt:tftp
DROP       udp      anywhere             anywhere             udp dpt:snmp

Chain in_anti_dos (1 references)
target     prot opt source               destination

Chain in_anti_dos_syn (0 references)
target     prot opt source               destination

Chain in_anti_scan (1 references)
target     prot opt source               destination

Chain in_app (1 references)
target     prot opt source               destination
ACCEPT     tcp      anywhere             anywhere             tcp dpt:auth
ACCEPT     tcp      anywhere             anywhere             tcp dpt:546
ACCEPT     udp      anywhere             anywhere             udp dpt:546
DROP       tcp      anywhere             anywhere             tcp dpt:2021
DROP       udp      anywhere             anywhere             udp dpt:2021
DROP       tcp      anywhere             anywhere             tcp dpt:1976
DROP       udp      anywhere             anywhere             udp dpt:1976

Chain in_firewall (1 references)
target     prot opt source               destination
ACCEPT     icmpv6    anywhere             anywhere             ipv6-icmp neighbour-advertisement
ACCEPT     icmpv6    anywhere             anywhere             ipv6-icmp neighbour-solicitation
ACCEPT     icmpv6    anywhere             anywhere             ipv6-icmp router-solicitation
ACCEPT     udp      anywhere             anywhere             udp dpt:546
ACCEPT     tcp      anywhere             anywhere             tcp dpt:546
ACCEPT     all      anywhere             anywhere             state RELATED,ESTABLISHED
LOG        tcp      anywhere             anywhere             tcp flags:FIN,SYN,RST,ACK/SYN limit: avg 6/hour burst 5 LOG level alert prefix "Intrusion -> "
DROP       udp      anywhere             anywhere             udp dpt:domain
DROP       all      anywhere             anywhere
DROP       udp      anywhere             anywhere             udp dpt:546
DROP       tcp      anywhere             anywhere             tcp dpt:546

Chain in_ip_filter_in (1 references)
target     prot opt source               destination

Chain in_mcast (1 references)
target     prot opt source               destination
#
请问你用多少版本的1.2还是1.7
回复

使用道具 举报

 楼主| | 显示全部楼层
15000107501 发表于 2020-5-10 03:16
请问你用多少版本的1.2还是1.7


设备基本信息

设备型号:        E-140W-P
设备标识号:        xxxxxxxxxxxxxxxxxxxxxxxxx
硬件版本:        E140WV1B1
软件版本:        ASB_E140WV1.2S
PON注册状态        已注册已认证
OSGI版本号        1.0
JVM版本号        1.0
回复

使用道具 举报

来自手机 | 显示全部楼层
挖坟关注,不知道楼主解决了吗?
回复

使用道具 举报

 楼主| | 显示全部楼层
magicwolf 发表于 2021-10-16 08:31
挖坟关注,不知道楼主解决了吗?

贝尔光猫临时解决ipv6开放端口办法:首先想办法获取光猫telecomadmin密码,自行破解或者问电信小工讨要。然后用这组账号登陆光猫网页控制台,在保持登陆情况下,修改浏览器地址栏中地址后缀,得以打开一个隐藏页面,隐藏页面上有开关可以开启telnet服务。再从内网telnet连光猫ip地址,用账户telnetadmin@telnetadmin登陆,进入控制台,输入linux回车,进入shell,好像是裁剪版的ash。在shell环境下,输入ip6tables……自行编辑的命令行,可以打开ipv6的防火墙。一般光猫做网关,内网机器开端口开服务,那么光猫的forward链需要开放对应的端口转发。主要在于fwd_firewall这个链。一般用insert来添加规则,不要全部关闭防火墙,也不要删改原有规则,当然添加的规则开放太多也等于防火墙形同虚设。
回复

使用道具 举报

 楼主| | 显示全部楼层
研究过能否固化ip6tables规则到光猫固件中保存。但是没有搞成功。似乎贝尔光猫固件没有对应保存规则功能。固件能保存ipv4规则重启不丢失,但是这个机制没能搞懂。所以只能每次重启光猫后自行添加ipv6规则。另外研究了一下如何用内网机器自动扫描光猫是否缺ipv6规则并添加ipv6规则,太过麻烦,也没成。
回复

使用道具 举报

thethrax 发表于 2021-10-16 09:49
研究过能否固化ip6tables规则到光猫固件中保存。但是没有搞成功。似乎贝尔光猫固件没有对应保存规则功能。 ...

多谢答复,看来还是改桥接用路由拨号方便些
回复

使用道具 举报

 楼主| | 显示全部楼层
magicwolf 发表于 2021-10-16 10:12
多谢答复,看来还是改桥接用路由拨号方便些

我还是维持光猫做防火墙,稳。内网机器再防。如果桥接用自己机器做网关,就要弄好防火墙,一有缺口就容易被攻击。
回复

使用道具 举报

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

本版积分规则

关闭

欢迎大家光临恩山无线论坛上一条 /1 下一条

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

GMT+8, 2024-5-22 10:17

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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

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