我运行一个Ubuntu服务器。 它有1个2个IP地址的网卡。 它看起来像这样:
# The primary network interface auto eth0 iface eth0 inet static address 192.168.1.23 netmask 255.255.255.0 gateway 192.168.1.254 auto eth0:0 iface eth0:0 inet static name Ethernet alias LAN card address 101.0.140.53 netmask 255.255.255.248 gateway 101.0.140.54
我可以将应用程序绑定到任何一个IP地址,但不能同时绑 所以,当我绑定到广域网上,没有人可以连接(与路由器不允许的东西)所以万用户连接到地址101.0.140.53。 局域网用户可以使用192.168.1.23来连接。
我想绑定到广域网地址,并设置可能iptable将192.168.1.23直接移动到101.0.140.53。 或者任何其他方法。
任何帮助将是伟大的
绑定到0.0.0.0 。 这意味着所有的IP。