Skip to content

Instantly share code, notes, and snippets.

@v-thomp4
Created April 3, 2017 10:48
Show Gist options
  • Save v-thomp4/9a3982a749a98cc771ea180f9a7d33a8 to your computer and use it in GitHub Desktop.
Save v-thomp4/9a3982a749a98cc771ea180f9a7d33a8 to your computer and use it in GitHub Desktop.
openvz config iptables
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