Hello,
I decided to move my OpenVPN into OpenVZ, but I got some troubles. I guess it's NAT. tun0 device doesn't forward any packets TX=0.
iptables rules:
iptables -t nat -A POSTROUTING -j SNAT --to 88.xx.81.85 -s 192.168.2.0/255.255.255.0
tcpdump -i tun0
21:29:47.648984 IP 192.168.2.5 > 64.233.167.99: ICMP echo request, id 1536, seq 20224, length 40
21:29:52.929442 IP 192.168.2.5 > 64.233.167.99: ICMP echo request, id 1536, seq 20480, length 40
/etc/vz/vz.conf
IPTABLES="iptable_nat ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length"
/etc/modprobe.conf
..
options ip_conntrack ip_conntrack_enable_ve0=1
ifconfig
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.15.1 P-t-P:192.168.15.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:75 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:3872 (3.7 KiB) TX bytes:0 (0.0 b)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:706 errors:0 dropped:0 overruns:0 frame:0
TX packets:454 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:61208 (59.7 KiB) TX bytes:58291 (56.9 KiB)
venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:88.xx.81.85 P-t-P:88.xx.81.85 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
Thank you in advance