我已将nginxconfiguration为TCP(非http)stream的反向代理。 我想对特定的源IP地址应用不同的路由 – 可以这样做,以及如何? 我知道使用if伪指令的http模块的推荐,但似乎不适用于这些stream。 现有configuration: stream { server { listen 8000; proxy_pass staging; } } upstream staging { server 1.2.3.4:8000; } 期望的configuration(不工作): stream { server { listen 8000; proxy_pass staging1; if ( $remote_addr ~* 4.5.6.7 ) { proxy_pass staging2; } } } upstream staging1 { server 1.2.3.4:8000; } upstream staging2 { server 1.2.3.44:8000; } […]
(从AskUbuntu dublicate问题)我有一个下面的networking图: networking图 192.168.0.0/24networking与4个networking服务器(.1,.2,.3,.4)。 其中有2个Ubuntu 14.04(VM1和VM2)。 它们有两个物理接口(eth0和eth1)。 和一个L2TP以太网隧道,configuration方式如下: root@vm1:~# modprobe l2tp_eth root@vm1:~# ip l2tp add tunnel tunnel_id 1000 peer_tunnel_id 2000 encap udp local 10.0.0.1 remote 10.0.1.1 udp_sport 6000 udp_dport 5000 root@vm1:~# ip l2tp add session tunnel_id 1000 session_id 3000 peer_session_id 4000 root@vm2:~# modprobe l2tp_eth root@vm2:~# ip l2tp add tunnel tunnel_id 2000 peer_tunnel_id 1000 encap udp […]
我试图在Ubuntu 12.04上设置路由表。 networking环境如下: server —–eth0 192.168.0.1 (DMZ)—LAN—-10.13.xx 由于192.168.0.1与局域网之间的通信过于繁重,防火墙将会崩溃。 因此,我试图暂时和服务器的接口,以便我们可以绕过防火墙。 configuration如下。 —eth0 192.168.0.1(DMZ) | server—–eth1 10.13.0.1 (LAN) 当eth1启动时,局域网中的主机(10.13.xx)可以ping通eth1,但不能ping通eht0。 路由表如下 Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.0.254 0.0.0.0 UG 0 0 0 eth0 10.13.0.0 0.0.0.0 255.255.255.0 U 1 0 0 eth1 192.168.0.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0 我如何设置路由表,使局域网中的主机可以同时连接eth0和eth1(IP地址为10.13.xx的主机可以ping通eth1和eth2)?
我有一个云SSD VPS @ OVH,我想改变用于请求的默认接口。 我有两个接口:eth0(这是默认的接口)和eth0:0(这是我想使用的新的虚拟接口)。 这里是route -n和interfaces文件的输出: daniil@vps262458:~$ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 164.132.40.1 0.0.0.0 UG 0 0 0 eth0 164.132.40.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth0 daniil@vps262458:~$ cat /etc/network/interfaces # The loopback network interface auto lo iface lo inet loopback auto eth0 iface […]
我已经search了如何做到这一点的细节,但我一直没有成功 – 我想知道是否有人可以提供一些build议。 我有2个网卡(我的情况是LAN和3G),LAN是我的主要接口(静态),3G是dynamic的。 我在机器上安装了自定义代理服务器,可以通过局域网的19000端口上的静态外部IP访问。它可以工作,但是通过我的主局域网接口路由,我需要通过3G接口路由这个代理服务器。 以下是我的接口和路由表的外观: eth0 Link encap:Ethernet HWaddr 0e:93:9f:f1:98:10 inet addr:10.100.9.35 Bcast:10.100.9.255 Mask:255.255.255.0 eth1 Link encap:Ethernet HWaddr 02:1e:10:1f:00:00 inet addr:10.226.59.139 Bcast:10.226.59.143 Mask:255.255.255.248 route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 10.100.9.1 0.0.0.0 UG 0 0 0 eth0 10.100.9.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 10.226.59.136 […]
我想在客户虚拟机上设置双协议栈。 路由器也是一台虚拟机。 在Debian Wheezy上运行。 整体由ESXi虚拟化。 IPv4工作正常。 从客户虚拟机Ping ping6 -c 1 heise.de PING heise.de(redirector.heise.de) 56 data bytes From fe80::20c:29ff:fea2:cb92 icmp_seq=1 Destination unreachable: Beyond scope of source address — heise.de ping statistics — 1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms |客户虚拟机| –eth0 – > <— eth1– | routing vm | –eth0 – […]
我试图操作2个子网, 192.168.0.0/24范围内的第一个子网可以自由访问任何东西,包括第二个子网上的机器。 10.0.0.0/24范围内的第二个子网仅限于能够访问外部世界。 我不希望具有10.0.0.0/24以内的源的机器能够访问192.168.0.0/24范围内的机器,但我确实希望它能够出去。 最重要的是,在192.168.0.0/24范围内,我也想要2个网关,第一个是通过VPN路由stream量的默认网关(目前是Ubuntu VM的forms),其地址是192.168.0.250 ,第二个网关(这是面向互联网的TP-Link无线路由器)在192.168.0.1 (也是192.168.0.0/24范围的DHCP和DNS服务器) 我也有第三个网关桥接两个子网,另一个有2个NICS的Ubuntu VM,第一个是192.168.0.251 ,第二个是10.0.0.1 现在我已经解释了我想要的networking,这是我的设置和我正在经历的: Ubuntu虚拟机192.168.0.250 192.168.0.250上的路由表如下所示: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 10.8.0.1 128.0.0.0 UG 0 0 0 tun0 default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0 10.0.0.0 192.168.0.251 255.255.255.0 UG 0 0 0 eth0 10.8.0.0 * 255.255.0.0 U 0 […]
所以我在我的工作中接了一个项目,把四个独立的networking合并到一个科洛中心。 目前,我把ASA 5510上的四个networking中的所有东西都分解成4个VLAN。每个networking都分配有一个/ 24子网的IP。 我已经在ASA 5510上设置了IP地址为172.20.0.1的端口e0 / 1,并使用IP地址172.20.0.3将它发送到3550上的fa0 / 48。 我已经能够ping通这两个接口,并且能够build立从ASA到Internet的路由。 我不知道该从哪里出发。 这里是展示为ASA 5510运行 mdc-fw01# show run : Saved : ASA Version 9.1(5) ! hostname mdc-fw01 domain-name mdcommerce.local enable password F7aoYryYQMUHhnCL encrypted names ! interface Ethernet0/0 nameif outside security-level 0 ip address 216.176.***.*** 255.255.255.240 ! interface Ethernet0/1 duplex full nameif inside security-level 100 ip address […]
我运行一个使用quagga的ubuntu路由器。 路由器有许多虚拟接口,每个都连接到不同的上游伙伴。 其中一个虚拟接口连接到IX。 由IX分配的IP不是全球路由,只用于与IX的对等伙伴进行通信(但它是公共IP,而不是私有IP)。 问题是在路由器上运行的prorgrams似乎取决于目标IP的源IP。 因此,例如mtr 50.31.164.145使用我们的IX分配IP作为其来源,因此不起作用。 我知道我可以在使用mtr时指定源IP地址 – mtr –address XXXX 50.31.164.145 ,但是有很多程序不提供这个选项。 有没有办法一般拒绝接口/ IP的(自动)使用,以便IX分配IP永远不会自动使用?
我有proxmox 4基于debian 8在两个主机A和B.都有两个网卡。 每个主机的一个NIC通过交叉电缆连接。 Host A: eth0: public IP eth1: 10.0.0.2/24 vmbr1: 10.0.0.1/24 Host B: eth0: public IP eth1: 10.0.1.2/24 vmbr1: 10.0.1.1/24 在vmbr1上,每个主机上都附有一个容器,其中包含10.0.x.10。 我会这样表示: Host A: veth100i1@if12: 10.0.0.10/24 (IP only visible inside container on eth0) Host B: veth100if1@if30: 10.0.1.10/24 (IP only visible inside container on eth0) 路由表主机A: Kernel IP routing table Destination Gateway Genmask Flags […]