I am having a problem with an Ubuntu server running two NICs on two different subnets androuting between them. We are running a Nginx server as a reverse proxy with a public subnet and private subnet.
We are running ubuntu server 15.04.
Here’s the setup :
eth0 Link encap:Ethernet HWaddr 00:50:56:88:6e:91
inet addr:89.21.20.14 Bcast:89.21.20.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fe88:6e91/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:89152 errors:0 dropped:0 overruns:0 frame:0
TX packets:1729 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5552124 (5.5 MB) TX bytes:286442 (286.4 KB)
eth1 Link encap:Ethernet HWaddr 00:50:56:88:16:0b
inet addr:10.150.200.50 Bcast:10.150.200.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fe88:160b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:549 errors:0 dropped:0 overruns:0 frame:0
TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:53395 (53.3 KB) TX bytes:1908 (1.9 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:160 errors:0 dropped:0 overruns:0 frame:0
TX packets:160 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:12960 (12.9 KB) TX bytes:12960 (12.9 KB)
I have the gateway on eth0.
When I try and ping 89.21.20.14 from a server on 10.150.200.xx subnet it isn’t working and I cannot communicate with it. The traffic is hitting eth0 as I can see from
sudo tcpdump -i eth0 proto \\icmp
I have also tried to do the same thing going from a server in 89.21.20.xx and access/ping 10.150.200.50 but that isn’t going through either. When running the tcpdump I can see the pings hitting eth1
Problem is that we have websites running on the private subnet web servers and they reference domains that point to the public IPs on 89.21.20.xx and therefore cannot communicate with the sites/applications.
I’m thinking it’s some kind of routing issue but not too sure of where to start?
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 89.21.24.1 0.0.0.0 UG 0 0 0 eth0
10.150.200.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
89.21.20.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 89.21.20.1 0.0.0.0 UG 0 0 0 eth0
10.150.200.0 * 255.255.255.0 U 0 0 0 eth1
localnet * 255.255.255.0 U 0 0 0 eth0
route
command output.eth1
from things that are connected to that private subnet oneth1
). Also explain why this is tagged as 'nginx'