Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
squallcx
V2EX  ›  Linux

WebServer 如何实现选端口对应一个 interface

  •  
  •   squallcx · Jul 4, 2016 · 2858 views
    This topic created in 3677 days ago, the information mentioned may be changed or developed.

    我有三条对外线路, interface 分別 ppp0,ppp1,ppp2 ,ip 不固定 web server ,监听三个 port8000,8001,8002

    使用不同的 port 访问 web server 时 想个别对应一个 interface 。

    目前是在访问 web server 时 执行命令 ip route replace default dev ethX 但这样不能同时使用三条线路

    有什么思路可以实现?

    3 replies    2016-07-04 15:38:06 +08:00
    des
        1
    des  
       Jul 4, 2016 via Android
    难道不是监听 0.0.0.0 就行??
    reus
        2
    reus  
       Jul 4, 2016
    做不到。
    realpg
        3
    realpg  
       Jul 4, 2016
    给你个关键词
    双线双 IP 路由
    参考他的实现方式
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5774 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 02:38 · PVG 10:38 · LAX 19:38 · JFK 22:38
    ♥ Do have faith in what you're doing.