SQL Server Long SQL Queries not working over libreswan tunnel

sf6xfgos  于 2023-02-28  发布在  其他
关注(0)|答案(1)|浏览(222)

I have a Rocky Linux 8 distro in my office as a LAMP with the ODBC and SQL drivers.
This machine is behind a SonicWall VPN making a tunnel to another SonicWall to connect to the SQL Server. This Linux box is an API and needs to be working all the time, but since it is in our office and there is a lot of construction we have electrical power outages very frequently.

I decided to move this API box to the cloud.

Here is where I have the problem.

In the cloud I am using a rocky Linux 8 distro with libreswan to create the tunnel with the other SonicWall. I think the tunnel is working ok.

I have in the same network another Rocky Linux 8 box for the API with the same settings that I have in my office.

I am able to make Queries but only works if the query is small.

If I run a query with a select of 11 fields it times outs.... it just does not work...

The same long query works ok in my office, but not in cloud environment, but if I remove a couple of Select fields it works...

I tried setting the MTU on the tunnel to 1392 but it did not work. I believe the problem could be with the libreswan tunnel but I don't know what to do.

Here is the image of my setup

I hope it helps.

mwngjboj

mwngjboj1#

just for the record, I used the following to fix the Issue.

iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1380

I found it on https://libreswan.org/wiki/FAQ#My_ssh_sessions_hang_or_connectivity_is_very_slow

it fixed the problem....

相关问题