Created
December 19, 2012 00:30
-
-
Save amalc/4333390 to your computer and use it in GitHub Desktop.
Setting up forwarding on client for OpenVPN for client to reach each other on CentOS 6.xx
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
service openvpn start | |
# Now we need to enable IP forwarding. So open the file /etc/sysctl.conf and set ‘net.ipv4.ip_forward’ to 1. | |
net.ipv4.ip_forward = 1 | |
# To make the changes to sysctl.conf take effect, use the following command. | |
sysctl -p | |
# Route Iptables: | |
# The rule below will work fine on xen and KVM based VPS’s but for OpenVZ use the OpenVZ iptable rule instead: | |
# iptables -t nat -A POSTROUTING -s youropenvpnendpointaddress/yournetmask -o eth0 -j MASQUERADE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment