1

Background

I have a set of embedded hardware deployed in the field. These remote machines connect back to my servers at AWS running Ubuntu and I use the iptables mangle chain to lower the MTU to 500 so these devices are happy. For reference, this is the iptables rule I am using:

-A POSTROUTING -p tcp --sport 12345 --tcp-flags SYN,RST SYN -o eth0 -j TCPMSS --set-mss 500

Current Problem

I'm trying to spin up some servers on the Joyent Cloud using SmartOS, but I can't find any information on selectively changing the MTU like I can on Linux (e.g. all info I've found is on changing it globally, which is not what I want).

How would I do it so that all connections on TCP port 12345 get the MTU I want?

Dave S.
  • 83

1 Answers1

0

Based on feedback from Joyent's support team, this appears to not be possible. The MTU can only be set on the interface level, not via the firewall as one can with Linux.

Note that it is theoretically possible to change the MTU for a socket via the setsockopt call (via the TCP_MAXSEG option), but there is currently no extension available for node.js to do so. Other app platforms should use the setsockopt call.

Dave S.
  • 83