Created
November 9, 2016 14:37
-
-
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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