Type 1:Point-to-Point Connection
Type 2:Point-to-Server Connection
Type 3:Site-to-Site Connection作者: Skypeus 時間: 2013-11-25 21:54
真是太赞了。 角色。顶你啊!哈哈!
我也要抽空来学习一下这上openvpn.作者: 角色 時間: 2013-11-27 22:13
本帖最後由 角色 於 2013-11-28 01:24 編輯
The following link gives very good examples of different OpenVPN configurations.
[3] provides us many important concepts in order to send packets to the remoter server's gateway.
IP Forwarding
From [2], there are two important things that we need to notice. First one is to enable IP forwarding using
sysctl -w net.ipv4.ip_forward=1, or
echo 1 > /proc/sys/net/ipv4/ip_forward
MASQUERADE
#eth0 - internet
#eth1 - network
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth1 -j ACCEPT
For PPTP VPN
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
In [4], it provides examples for OpenVPN with MASQUERADE.
In [5], it gives examples of setting the firewall.