Created
February 26, 2021 12:32
-
-
Save mikhail-angelov/1e6bb89eb14741a331132f8abc142df2 to your computer and use it in GitHub Desktop.
iptable docker
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
#to disable external export port | |
iptables -I DOCKER 1 -i eth0 -p tcp --dport 5432 -j DROP | |
#to allow export port for particular IP | |
iptables -I DOCKER 1 --src 195.201.137.198 -m tcp -p tcp --dport 5432 -j ACCEPT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment