Created
April 3, 2017 10:48
-
-
Save v-thomp4/9a3982a749a98cc771ea180f9a7d33a8 to your computer and use it in GitHub Desktop.
openvz config iptables
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
Edit /etc/sysconfig/iptables: | |
vi /etc/sysconfig/iptables | |
Find the following two lines: | |
:FORWARD ACCEPT [0:0] | |
:OUTPUT ACCEPT [0:0] | |
Add the following lines(marked in bold letters) between the above two lines. | |
:FORWARD ACCEPT [0:0] | |
-P FORWARD ACCEPT | |
-F FORWARD | |
:OUTPUT ACCEPT [0:0] | |
Also, make sure the following has been commented out. | |
#-A FORWARD -j REJECT –reject-with icmp-host-prohibited | |
Save and close the file. | |
Then, Restart iptables service to take effect the saved changes. | |
service iptables restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment