强制在路由器的另一个接口上发布种子

强制在路由器的另一个接口上发布种子

我们有一个带有 2 个 WAN 的 MikroTik 路由器main(带宽好且昂贵),backupmain我们日常使用,backup带宽很慢。

我们有一台 Synology NAS 处理下载,我想强制通过backup网关上的接口进行 torrent 下载。这是我当前的配置:

/ip firewall filter add action=accept chain=forward comment="H2G2: Allow forward to DSM" dst-address=192.168.1.3 dst-port=22,80,139,443,445,5001,32400 protocol=tcp
/ip firewall filter add action=accept chain=forward comment="H2G2: Allow forward established, related replies to H2G2" connection-state=established,related dst-address=192.168.1.3 protocol=tcp
/ip firewall filter add action=accept chain=forward comment="H2G2: Allow established and related replies from H2G2" connection-state=established,related protocol=tcp src-address=192.168.1.3
/ip firewall filter add action=drop chain=forward comment="H2G2: Drop everything else not coming from backup" dst-address=192.168.1.3 in-interface=!ether2-backup

/ip firewall nat add action=masquerade chain=srcnat out-interface=ether1-main
/ip firewall nat add action=masquerade chain=srcnat out-interface=ether2-backup
/ip firewall nat add action=dst-nat chain=dstnat dst-port=22 in-interface=ether1-main protocol=tcp to-addresses=192.168.1.3 to-ports=22
/ip firewall nat add action=dst-nat chain=dstnat dst-port=80 in-interface=ether1-main protocol=tcp to-addresses=192.168.1.3 to-ports=80
/ip firewall nat add action=dst-nat chain=dstnat dst-port=139 in-interface=ether1-main protocol=tcp to-addresses=192.168.1.3 to-ports=139
/ip firewall nat add action=dst-nat chain=dstnat dst-port=443 in-interface=ether1-main protocol=tcp to-addresses=192.168.1.3 to-ports=443
/ip firewall nat add action=dst-nat chain=dstnat dst-port=445 in-interface=ether1-main protocol=tcp to-addresses=192.168.1.3 to-ports=445
/ip firewall nat add action=dst-nat chain=dstnat dst-port=5001 in-interface=ether1-main protocol=tcp to-addresses=192.168.1.3 to-ports=5001
/ip firewall nat add action=dst-nat chain=dstnat dst-port=32400 in-interface=ether1-main protocol=tcp to-addresses=192.168.1.3 to-ports=32400
/ip firewall nat add action=dst-nat chain=dstnat dst-port=6881 in-interface=ether2-backup protocol=tcp to-addresses=192.168.1.3 to-ports=6881
/ip firewall nat add action=dst-nat chain=dstnat dst-port=6881 in-interface=ether2-backup protocol=udp to-addresses=192.168.1.3 to-ports=6881

/ip firewall mangle add action=mark-routing chain=prerouting dst-address=!192.168.1.0/24 new-routing-mark=toBackup passthrough=yes src-address=192.168.1.3

; Then route 0.0.0.0/0 toBackup routing mark to ether2-backup

因此,基本上,我允许将这些端口 (22、80、139、443、445、5001、32400) 的数据包转发到 NAS ( 192.168.1.3),并丢弃所有不来自该backup接口的其他数据包。我对这些端口进行 NAT。并且我用 标记来自 1.3 的连接(不是用于本地网络)。routing-mark toBackup显然,我将路由0.0.0.0/0标记toBackupether2-backup并且它有效。如果我将 NAS 访问到其中一个转发端口,则没问题。其他一切都通过备份进行。

现在,问题是,所有内容都会备份。我不太了解 torrent、PEX、DHT 协议,我不确定服务器及其文件何时被宣传。我知道 torrent 和 magnet 的跟踪器有嵌入式跟踪器,甚至可以通过 HTTP 访问,因此这取决于文件何时被宣传。如果在客户端向跟踪器宣布自己时宣传它们,那么我可能会将所有内容保留为备份。如果它们仅在从外部联系时才宣布(目前,我的监听端口是 6881 UDP 和 TCP),那么最好阻止 6881 ether1-main,但我再次担心客户端会通过 HTTP 向跟踪器宣布自己(因此通过ether1-main和显然会在同一个 IP 上宣传自己,而不是ether2-backup)...

你们知道我该如何实现这个目标吗?

相关内容