title: static route w/ next hop to VPN gets "Network is unreachable'
body: <p>Ubuntu 14.04, linux kernel 3.13.0-77-generic</p>
  
  <p>I have 3 servers A, B, and C. Servers A and B are in the same network (Rackspace) and server C is in another Network (AWS). I have a VPN connection that goes from server B to the VPC that server C is located in. The VPN connection works, I can send traffic across it from server B to server C and vice versa. What I have not been able to figure out is how to route traffic from server A to server C. I believe the solution is to add a static route on server A, like so:</p>
  
  <pre><code>$&gt; route add -net 10.0.0.0 netmask 255.252.0.0 gw xxx.xxx.xxx.xxx
  </code></pre>
  
  <p>where xxx.xxx.xxx.xxx is the private ip address of server B. However, the output of this command is </p>
  
  <pre><code>SIOCADDRT: Network is unreachable
  </code></pre>
  
  <p>I can ping and route traffic to server B from server A, so I assume the unreachable network is the one that is across the VPN tunnel. </p>
  
  <pre><code>#/ect/sysctl.conf on server B
  -----------------------------
  net.ipv4.ip_forward=1
  net.ipv4.conf.all.accept_redirects = 0
  net.ipv4.conf.all.send_redirects = 1
  
  net.ipv4.conf.eth0.arp_notify = 1
  vm.swappiness = 0
  net.ipv4.tcp_rmem = 4096 87380 33554432
  net.ipv4.tcp_wmem = 4096 65536 33554432
  net.core.rmem_max = 33554432
  net.core.wmem_max = 33554432
  net.ipv4.tcp_window_scaling = 1
  net.ipv4.tcp_timestamps = 1
  net.ipv4.tcp_sack = 1
  net.ipv4.ip_forward = 1
  net.ipv4.conf.all.accept_redirects = 0
  net.ipv4.conf.all.send_redirects = 0
  net.ipv4.conf.default.rp_filter = 0
  net.ipv4.conf.default.accept_source_route = 0
  net.ipv4.conf.default.send_redirects = 0
  net.ipv4.icmp_ignore_bogus_error_responses = 1
  </code></pre>
  
  <p>Not sure if I'm using the <code>route</code> command incorrectly, or if this is even the right way to route traffic from server A through the vpn to server C.</p>
  
  <p>I have also tried specifying a single host -- the private ip of server C (instead of the CIDR of the whole VPC) -- in the <code>route add</code> command but I get the same output.</p>