1

Linux 服务器转发流量用什么?

 2 years ago
source link: https://www.v2ex.com/t/849671
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Linux 服务器转发流量用什么?

V2EX  ›  Linux

Linux 服务器转发流量用什么?

  jatsz2020 · 4 小时 41 分钟前 · 655 次点击

有一台 linux 服务器,假设 IP 为 IP1 ,需要把流量转发到其他服务器

IP1:10000  →  IP2:20000

IP1:10001  →  IP3:2341

问题 1 ,有哪些软件可以做到

问题 2 ,后面的 IP2,IP3 ,以及端口,会经常更换的情况,哪个软件更适合

16 条回复    2022-04-28 02:05:33 +08:00

xavierskip

xavierskip      4 小时 28 分钟前

socat

ampedee

ampedee      4 小时 26 分钟前 via iPhone

iptables 或者 ipvs?

x86

x86      4 小时 24 分钟前

redir

rekulas

rekulas      4 小时 24 分钟前

nginx 一把梭路过

hefish

hefish      4 小时 23 分钟前

楼上说的几个办法,都能实现。。。

datou

datou      4 小时 21 分钟前

iptables 最简单

seers

seers      4 小时 16 分钟前

nginx 吧,还能负载均衡,修改配置生效也不麻烦

x86

x86      4 小时 13 分钟前

是在不行就搞现在矿工那一套,带 web 端的,单纯转发和带 SSL 证书的也可以,另外还带监控啥的

linglin0924

linglin0924      3 小时 58 分钟前

前几天在 V2EX 上看到分享的。 挺好的,现在还在用着。简单明确功能丰富的转发。

https://github.com/dushixiang/4dnat

Silently

Silently      3 小时 39 分钟前 via iPhone

jinliming2

jinliming2      3 小时 35 分钟前 via iPhone

iptables 或者 nftables 。
iptables 的资料多一些,但是各种参数不太好记。我倾向于用 nftables ,资料也不少,配置文件也便于阅读理解。
你这个就是个简单的 DNAT ,生成个 DNAT 的路由规则就行了,指定匹配源地址 NAT 到目的地址

A01514035

A01514035      3 小时 28 分钟前

闲蛋中转面板

nightwitch

nightwitch      3 小时 20 分钟前

iptables ,需要 root 权限,而且配置稍微复杂点。
socat 一行就可以,但是要自己编译

cubecube

cubecube      3 小时 5 分钟前

iptables 性能最好,因为网络协议栈没走全,也不会存在各种程序进程可能的 bug

NSAgold

NSAgold      1 小时 33 分钟前 via Android

会经常更换的话建议整个带网页端面板的,改起来方便

wtks1

wtks1      1 小时 9 分钟前 via Android

关于   ·   帮助文档   ·   API   ·   FAQ   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   1223 人在线   最高记录 5497   ·  

创意工作者们的社区

World is powered by solitude

VERSION: 3.9.8.5 · 21ms · UTC 19:15 · PVG 03:15 · LAX 12:15 · JFK 15:15
Developed with CodeLauncher
♥ Do have faith in what you're doing.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK