Problem with TCP and GRE tunnel
-
Is that a real subnet your ISP has given you though? A full /24 would normally be quite expensive!
If it is a real public subnet then target hosts will have a route back to it directly. You would need to NAT it at the VPS.
Unlss that subnet is in fact routed to your VPS instance?
-
@stephenw10 I just bought 4 ips not the entire subnet, it's just simulating on the local pf but only this 4 ips are being routed with the tunnel. Is there anything wrong in the traffic i sent?
-
Ok, where are those IP addresses routed to though? To the local pf or the remote pf at the VPC?
-
@stephenw10 In local PFsense there is a firewall rule specifying that each IP provided by the isp has the gre tunnel gateway and we do not nat those IPs which means they are leaving through the tunnel how they are. In the remote PFsense there is a static router for each IP address to go through the gre tunnel and I disabled nat in the remote PFsense for these IPs. I did pcap on the wan and gre on both pfsenses and the traffic is being sent and received on the local pfsense lan as well. The ping goes perfectly both from the outside to the inside and from the inside to the outside.I also did a traceroute from my PC to an IP and it is correct and a traceroute from a host with an IP from my isp to 1.1.1.1 and I see both going through the gre and reaching the destination.The dns on the host with an IP from my isp are 1.1.1.1 and 8.8.8.8 but when I ping a dns or curl a dns it takes a long time.However, I can see the response from 1.1.1.1 to the dns I want in the pcap in the local pfsense on the lan, the dns and the IP address of the requested dns. But on the host it takes a long time.
-
So those public IP addresses are globally routed to the VPC? You purchased them from the VPC provider?
If they are routed to the local pf by your ISP that then creates an asymmetric route.
-
@stephenw10 But the ISP is not making a static route, it's proxy arp. And yes the IPs are bought from the VPC provider
-
Ok, if the IPs are purchased from the VPC then they are presumably routed to the public IP there. So that should avoid any asymmetric routing.
So I would run a pcap on the WAN interface at the VPC end and see what's happening there for an ICMP and TCP connection.
-
@stephenw10
There's the pcap -> (WAN) on the VPC with "ping google.com" and "curl ifconfig.me"
-
Can you upload the actual pcap file here? https://nc.netgate.com/nextcloud/s/BynTbfz33wrToAm
I assume the curl fails?
-
@stephenw10 I'll do it in a sec, no the curl works but with a lot of delay
-
@stephenw10 Uploaded the pcap from VPC, WAN while doing a curl ifconfig.me
-
Hmm, weird there's a 30s gap between the initial syn/ack handshake and the http get request.
Does that same delay appear at local pf in a pcap there? It seems unlikely it would actually just wait which implies the initial request is being lost. Perhaps an MTU issue?
Is there any reason you chose to use GRE for this instead of something encrypted?
-
@stephenw10 Do you want a pcap on the local pf? If yes which interface? GRE?
An there's no reason to chose GRE, I just heard about it and decided to give it a try. -
The pcap should be identical on the local GRE and LAN interfaces. If it isn't that's probably where the problem is.
GRE has a few quirks that OpenVPN or route-mode IPSec do not. Since you're not NATing or encrypting though you shouldn't be hitting any of them.
-
@stephenw10 I think they are but maybe i miss something, do you want me to upload the pcap on the same URL?
-
Yes please.
-
@stephenw10 Done
-
Ok well the delay is a lot longer there but you can see the local host sends the http request almost immediately after the handshake. So packets are being lost somewhere.
Try running pcaps on both ends of the GRE tunnel at the same time. Run the curl command and see how they compare.
-
@stephenw10 Just upload them. Also how can I open the pcap files to compare them?
-
Using Wireshark is easiest. Though you can also just set the view to high or full in the pfSense webgui and see the timing info etc.