Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试为多个站点创建一个 tftp 服务器。服务器只有一个 IP 地址(10.10.1.69),但必须处理多个 tftp“实例”。
目前我已经在 rlinetd 中安装了带有两个服务的 atftpd 和两个单独的端口(6901 / 6902)。
我的手机正在查看端口 69(不变)。站点 A (10.10.40.0/24) 和站点 B (10.10.41.0/24) 的那些。
如何将引用源 IP 范围的这个 udp 流量拆分到一个或另一个端口?
提前致谢
找到解决方案...通过 iptables。
iptables -t nat -A PREROUTING --src 10.10.40.0/24 -i eth0 -p udp --dport 69 -j REDIRECT --to-port 6901 iptables -t nat -A PREROUTING --src 10.10.41.0/24 -i eth0 -p udp --dport 69 -j REDIRECT --to-port 6902
感谢收听 ;)