Skip to content

Instantly share code, notes, and snippets.

@jonsecchis
Forked from mbbx6spp/-etc-sysctl
Created October 22, 2020 20:10
Show Gist options
  • Select an option

  • Save jonsecchis/a889bb71cfc19ce23845ae31cd91c882 to your computer and use it in GitHub Desktop.

Select an option

Save jonsecchis/a889bb71cfc19ce23845ae31cd91c882 to your computer and use it in GitHub Desktop.
Ephemeral port range on OS X
net.inet.ip.portrange.first=32768
net.inet.ip.portrange.hifirst=32768
net.inet.tcp.msl=1000
# for postgresql
kern.sysv.shmall=65536
kern.sysv.shmmax=16777216
# defaults
net.inet.ip.portrange.lowfirst=1023
net.inet.ip.portrange.lowlast=600
net.inet.ip.portrange.last=65535
net.inet.ip.portrange.hilast=65535

Emphemeral port range on OS X

Explanation coming soon.

sudo sysctl -w net.inet.ip.portrange.first=32768
sudo sysctl -w net.inet.ip.portrange.hifirst=32768
sudo sysctl -w net.inet.tcp.msl=1000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment