This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MTU/MSS-Problem in IPsec VPN

Hallo Community,

wir haben bei einem Kunden ein Problem mit Traffic über einen IPsec-Tunnel zwischen der UTM des Kunden und einer Cisco ASA des Dienstleisters (Hosted ERP).

Die Mitarbeiter verbinden sich via Citrix ICA-Client über den S2S-Tunnel zum Dienstleister. Anfänglich war garkein Verbindungsaufbau möglich (ping funktionierte). Auf Bitten des Dienstleisters wurde dann in der UTM die MTU des WAN-Interfaces von 1500 auf 1380 reduziert. Dann konnte sich ein Client verbinden, eine zeitgleiche zweite Verbindung war jedoch nicht möglich.

Der externe Dienstleister gibt uns lediglich die Info weiter, dass die Pakete fragmentiert ankommen und es daher "an der MTU liegen muss."

Um die maximale Paketgröße zu ermitteln, pinge ich von der UTM aus den Server des Dienstleisters:

firewall:/root # ping -s 1394 -c 10 -M do x.x.x.205
PING x.x.x..205 (x.x.x..205) 1394(1422) bytes of data.
1402 bytes from x.x.x.205: icmp_seq=1 ttl=128 time=30.6 ms

firewall:/root # ping -s 1395 -c 10 -M do x.x.x.205
PING x.x.x.205 (x.x.x.205) 1395(1423) bytes of data.
ping: local error: Message too long, mtu=1422

Nach etwas Recherche hier im Forum wollte ich über folgenden iptables-Befehl die MSS auf 1394 setzen, in der Annahme (bzw. Hoffnung), dass mit diesem zuvor ermittelten Wert das Problem gelöst sei. Der Befehl, wie er hier zu finden ist, funktioniert aber nicht:

firewall:/root # iptables -I FORWARD 1 -o -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1394
Bad argument `tcp'
Try `iptables -h' or 'iptables --help' for more information.
firewall:/root #

Verstehe ich nicht - laut der iptables-manpage passt "-p tcp" als option... Äußerst seltsam. Habe im Forum hier weiter gesucht, und dabei einen weiteren Befehl gefunden - dieser wurde auch akzeptiert:

iptables -t mangle -I POSTROUTING -d 10.10.101.0/24 -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1394

Mit dieser Änderung (und der default-MTU von 1500 auf dem WAN-Interface) konnte der Kunde nun immerhin zwei Citrix-Sessions parallel aufbauen, eine dritte war jedoch wiederum nicht möglich.

Mir fällt leider jetzt nichts schlaues mehr dazu ein :(

Hinweis an dieser Stelle, bevor sich jemand über die MTU von 1500 auf dem WAN-Interface wundert:

Vor der UTM hängt ein Telekom-Router (Digitalisierungsbox Smart) der die PPPoE-Einwahl macht. Zwischen den beiden Gateways ist ein kleines Transfer-Netz (/30) eingerichtet, statische Routen sind eingetragen, kein NAT. 

Ich bin über jeden Tipp dankbar. 

TIA

Robin



This thread was automatically locked due to age.
Parents
  • The MTU reduction goes on the INSIDE interface.   The OUTSIDE interface stays at maximum value.   This leaves room for the packet to grow by the amount of the encryption overhead without needing to be split into multiple packets.

    You can configure the MTU from Webadmin... Interfaces and Routing... Interfaces... Edit Interface... Advanced... MTU

    If the MTU is set correctly, I do not think you need to do anything with MSS. 

    MTU=1380 should be a good value to use, based on my memory of prior experience.

    I think everything associated with iptables is temporary.  If I am correct on that point, it may explain your inconsistent results across multiple users.

  • Hi Douglas,

    thanks for your answer.

    With "INSIDE interface" you mean the internal LAN interface? If I remember correctly setting the MTU on this interface had no effect at all. But I will try it tomorrow again.

  • Yes, I meant the internal network interface when I referred to the "INSIDE" interface.  Non-VPN traffic will probably not notice the smaller packet size. 

    The smaller packet size only affects traffic going to UTM, or through UTM to the internet, not internal traffic between clients and servers.   For traffic that is going to the UTM or Internet, only large transfers are affected, and only increase the packet count slightly.

    But for VPN traffic, the smaller size of incoming packets allows one unencrypted packet to become one encrypted packet, instead of two.   This is a big win for the VPN users.

  • Hi Douglas,

    thank you. I changed the MTU of the internal LAN interface to 1380 and changed the MTU of the WAN interface back to 1500. After that I rebooted the UTM (to be sure the changed MTU will take effect and to get rid of the iptables command I entered before). 

    Now our customer is able to establish three connections at the same time, the fourth connection fails again. Do you think I should reduce the MTU of the internal interface to a smaller value than 1380?

    regards,
    Robin

  • very odd.  you need to stare at your ligs and ideally the desktop logs as well.   i cannot explain your symptoms.

Reply Children
No Data