0

I have two servers, server A and server B. Traffic for a certain subnet, 192.168.1.0/24, comes in through server A. Server A has a GRE tunnel setup with server B, and routes all traffic received for 192.168.1.0/24 over the GRE tunnel to server B.

Server B is supposed to take the traffic it receives over the GRE tunnel destined for 192.168.1.0/24 and forward it through it's default gateway. What currently happens is that Server A successfully sends the traffic over the GRE tunnel to server B, server B receives the traffic, but doesn't forward any of it through it's default gateway.

I am running Ubuntu 18.04, and I've enabled IP forwarding :

root@serverB:~# sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1

I'm not sure why, but it simply refuses to forward packets. From my knowledge, it should be forwarding the packets through the default gateway. I even went ahead and added a static route on server B to forward traffic destined for 192.168.1.0/24 through the default gateway, but it still doesn't forward any traffic, only receives the inbound traffic. I can see about 2Kbps of traffic inbound, destined for 192.168.1.0/24, but no outbound traffic being sent. Here are the routes on server B:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.204.1     0.0.0.0         UG    0      0        0 enp2s0 #Default Gateway
10.0.0.0        0.0.0.0         255.255.255.252 U     0      0        0 gre1 #GRE tunnel
192.168.1.0     192.168.204.1     255.255.255.0   UG    0      0        0 enp2s0 #static route I added

Does anyone have any ideas? Other posts were talking about NAT and masquerading, but I don't wish to proxy anything, and simply want transparent routing through this server to the next gateway.

1 Answers1

0

Disable rp_filter in the kernel. This solved my issue.