Created
September 3, 2021 11:57
-
-
Save ZulianTiger/df2671b6191f17315f14dfde2ec4a36e to your computer and use it in GitHub Desktop.
Whitelisting IP addres for remote postgres database access
This file contains 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
//Connect t | |
ssh user@ip-address | |
//Navigate to postgres config | |
cd ../../etc/postgresql/12/main | |
//Open config file and scroll to bottom | |
sudo nano pg_hba.conf | |
//Add line to the end (Don't forget '/32' subnet mask at the end of IP address) | |
host all all 77.78.197.32/32 trust | |
//CTRL+X to save and now restart postgres service | |
sudo service postgresql restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment