ebtables-linux-vyos

本文介绍了一种使用Ebtables进行网关劫持的方法,通过具体的配置命令展示了如何实现从特定接口eth1进入的数据包被重定向并最终丢弃的过程。


CT-----eth0--linux-BR0---eth1-----wan--ASA--lan--pc 



Ebtables 网关劫持


set ebtables broute BROUTING rule 10 in-interface eth1 

setebtables broute BROUTING rule 10 jump redirect

set ebtables broute BROUTING rule 10 jump_EXTENSIONS redirectredirect_target DROP

set ebtables broute BROUTING rule 10 protocol ip ip_source 110.116.8.2/32







admin@Archer NB450:~# ebtables -L IQOS_MARK_INPUT --Lx 为什么这个指令没有输出,但是 ebtables -L --Lx ebtables -t filter -N EB_FORWARD_BEFORE_LAN ebtables -t filter -N EB_FORWARD_LAN ebtables -t filter -N EB_FORWARD_AFTER_LAN ebtables -t filter -N EB_WIFI_FORWARD_2 ebtables -t filter -N EB_WIFI_FORWARD_5 ebtables -t filter -N EB_WIFI_FORWARD_6 ebtables -t filter -N EB_WIFI_FORWARD_4 ebtables -t filter -N EB_WIFI_FORWARD_7 ebtables -t filter -N EB_WIFI_FORWARD_8 ebtables -t filter -N ACCESSCTL ebtables -t filter -N IQOS_MARK_INPUT ebtables -t filter -N IQOS_MARK_FWD ebtables -t filter -N IQOS_MARK_OUTPUT ebtables -t filter -N EB_WIF ebtables -t filter -A INPUT -j IQOS_MARK_INPUT ebtables -t filter -A FORWARD -j EB_FORWARD_BEFORE_LAN ebtables -t filter -A FORWARD -j EB_FORWARD_LAN ebtables -t filter -A FORWARD -j EB_FORWARD_AFTER_LAN ebtables -t filter -A FORWARD -j IQOS_MARK_FWD ebtables -t filter -A OUTPUT -j IQOS_MARK_OUTPUT ebtables -t filter -P EB_FORWARD_BEFORE_LAN RETURN ebtables -t filter -P EB_FORWARD_LAN RETURN ebtables -t filter -A EB_FORWARD_LAN -j EB_WIFI_FORWARD_8 ebtables -t filter -A EB_FORWARD_LAN -j EB_WIFI_FORWARD_7 ebtables -t filter -A EB_FORWARD_LAN -j EB_WIFI_FORWARD_4 ebtables -t filter -A EB_FORWARD_LAN -j EB_WIFI_FORWARD_6 ebtables -t filter -A EB_FORWARD_LAN -j EB_WIFI_FORWARD_5 ebtables -t filter -A EB_FORWARD_LAN -j EB_WIFI_FORWARD_2 ebtables -t filter -A EB_FORWARD_LAN -i ath+ -o eth0+ -j ACCEPT ebtables -t filter -A EB_FORWARD_LAN -i eth0+ -o ath+ -j ACCEPT ebtables -t filter -A EB_FORWARD_LAN -i ath+ -o ath+ -j ACCEPT ebtables -t filter -A EB_FORWARD_LAN -i ath+ -o eth0+ -j ACCEPT ebtables -t filter -A EB_FORWARD_LAN -i eth0+ -o ath+ -j ACCEPT ebtables -t filter -A EB_FORWARD_LAN -i ath+ -o ath+ -j ACCEPT ebtables -t filter -A EB_FORWARD_LAN -i ath+ -o ath+ -j ACCEPT ebtables -t filter -A EB_FORWARD_LAN -i ath+ -o ath+ -j ACCEPT ebtables -t filter -P EB_FORWARD_AFTER_LAN RETURN ebtables -t filter -P EB_WIFI_FORWARD_2 RETURN ebtables -t filter -A EB_WIFI_FORWARD_2 -i ath01 -o ath12 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_2 -i ath11 -o ath12 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_2 -i ath0 -o ath12 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_2 -i ath1 -o ath12 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_2 -i eth1 -o ath12 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_2 -i eth0.5 -o ath12 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_2 -i eth0.4 -o ath12 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_2 -i eth0.3 -o ath12 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_2 -i ath12 -o eth1+ -j ACCEPT ebtables -t filter -A EB_WIFI_FORWARD_2 -i ath12 -j DROP ebtables -t filter -P EB_WIFI_FORWARD_5 RETURN ebtables -t filter -A EB_WIFI_FORWARD_5 -i ath01 -o ath13 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_5 -i ath11 -o ath13 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_5 -i ath0 -o ath13 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_5 -i ath1 -o ath13 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_5 -i eth1 -o ath13 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_5 -i eth0.5 -o ath13 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_5 -i eth0.4 -o ath13 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_5 -i eth0.3 -o ath13 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_5 -i ath13 -o eth1+ -j ACCEPT ebtables -t filter -A EB_WIFI_FORWARD_5 -i ath13 -j DROP ebtables -t filter -P EB_WIFI_FORWARD_6 RETURN ebtables -t filter -A EB_WIFI_FORWARD_6 -i ath01 -o ath14 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_6 -i ath11 -o ath14 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_6 -i ath0 -o ath14 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_6 -i ath1 -o ath14 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_6 -i eth1 -o ath14 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_6 -i eth0.5 -o ath14 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_6 -i eth0.4 -o ath14 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_6 -i eth0.3 -o ath14 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_6 -i ath14 -o eth1+ -j ACCEPT ebtables -t filter -A EB_WIFI_FORWARD_6 -i ath14 -j DROP ebtables -t filter -P EB_WIFI_FORWARD_4 RETURN ebtables -t filter -A EB_WIFI_FORWARD_4 -i ath01 -o ath02 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_4 -i ath11 -o ath02 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_4 -i ath0 -o ath02 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_4 -i ath1 -o ath02 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_4 -i eth1 -o ath02 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_4 -i eth0.5 -o ath02 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_4 -i eth0.4 -o ath02 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_4 -i eth0.3 -o ath02 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_4 -i ath02 -o eth1+ -j ACCEPT ebtables -t filter -A EB_WIFI_FORWARD_4 -i ath02 -j DROP ebtables -t filter -P EB_WIFI_FORWARD_7 RETURN ebtables -t filter -A EB_WIFI_FORWARD_7 -i ath01 -o ath03 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_7 -i ath11 -o ath03 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_7 -i ath0 -o ath03 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_7 -i ath1 -o ath03 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_7 -i eth1 -o ath03 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_7 -i eth0.5 -o ath03 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_7 -i eth0.4 -o ath03 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_7 -i eth0.3 -o ath03 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_7 -i ath03 -o eth1+ -j ACCEPT ebtables -t filter -A EB_WIFI_FORWARD_7 -i ath03 -j DROP ebtables -t filter -P EB_WIFI_FORWARD_8 RETURN ebtables -t filter -A EB_WIFI_FORWARD_8 -i ath01 -o ath04 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_8 -i ath11 -o ath04 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_8 -i ath0 -o ath04 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_8 -i ath1 -o ath04 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_8 -i eth1 -o ath04 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_8 -i eth0.5 -o ath04 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_8 -i eth0.4 -o ath04 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_8 -i eth0.3 -o ath04 -j DROP ebtables -t filter -A EB_WIFI_FORWARD_8 -i ath04 -o eth1+ -j ACCEPT ebtables -t filter -A EB_WIFI_FORWARD_8 -i ath04 -j DROP
最新发布
09-27
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值