Skip to content

Instantly share code, notes, and snippets.

@progmult
Created November 9, 2016 14:37
Show Gist options
  • Save progmult/fd6148ddb8241f90e8f14c758098b80d to your computer and use it in GitHub Desktop.
Save progmult/fd6148ddb8241f90e8f14c758098b80d to your computer and use it in GitHub Desktop.
Allow mysql external connection for IP of current ssh-session (if dynamic ip)
ssh_client_ip=`echo $SSH_CLIENT | awk '{ print $1}'`;
ipfw -q add 00431 allow tcp from $ssh_client_ip to me 3306 in via em0 keep-state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment