OpenVZ Forum


Home » General » Support » Unable to run OpenVPN - "openvpn --mktun --dev tap0" fails
Re: Unable to run OpenVPN - "openvpn --mktun --dev tap0" fails [message #23993 is a reply to message #23992] Thu, 29 November 2007 19:10 Go to previous messageGo to previous message
OpenVZ is currently offline  OpenVZ
Messages: 3
Registered: November 2007
Junior Member
tomfra wrote on Thu, 29 November 2007 13:44

Instead of this line:

/sbin/iptables -t nat -A POSTROUTING -s ! x.x.x.x -o venet0 -j SNAT --to-source x.x.x.x

try this one:

/sbin/iptables -t nat -A POSTROUTING -s 10.88.0.0/16 -o venet0 -j SNAT --to-source 192.168.1.5

where 10.88.0.0/16 is the internal IP range assigned by OpenVPN, you will very likely have a different one so don't forget to change it.

I am not saying it will work, I am really not a "pro" in this field, but it may be worth a try.

Tomas




Hello,

thank you. I did try it.. Not working.

If I look at the log, the vpn request doesn't come to the vps.. No entry about the request..

To forward port 1194 I use this command (in the hardware node):
iptables -t nat -A PREROUTING -p tcp -d 192.168.1.5 --dport 1194
 -i eth0 -j DNAT --to-destination PUBLIC_IP_OF_HARDWARE_NODE:1194


Maybe is it wrong or not enough?

[Updated on: Thu, 29 November 2007 19:11]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: *SOLVED* No Internet access on VEs (but I get remote SSH access)
Next Topic: Warning: Variable TEMPLATE not found in /etc/sysconfig/vz
Goto Forum:
  


Current Time: Wed Jun 18 19:59:09 GMT 2025

Total time taken to generate the page: 0.03673 seconds