[SOLVED] Sharing PPTP interface between VM

rhode

New Member
Jul 2, 2013
2
0
1
Brest, France
Hi !

I'm a new user of Proxmox. I would like to create a VM on Debian 6 with openVZ which is connected to a VPN router with PPTP-linux. This VM has a new network interface called ppp0 with IP adress 192.168.168.201 (static), it has too a Venet Interface with IP Adress 10.0.0.1. I have 3 others VM with IP Adress 10.0.0.2, 10.0.0.3 and 10.0.0.4. I Would like to share ppp0 interface from the first VM to the others VM. I tried to use route protocol but it doesn't work ...

Any ideas ? Thank you in advance !

I'm sorry for my english...

Best regards
Rhode
 
Last edited:
I solved it !


I installed PPTP-Linux on the node. By a simple script executed in crontab, I make a connection to my VPN Server. I obtained a ppp0 interface with its own IP Adress.
I just needed to make iptables rules to allow traffic from VM to ppp0 interface
iptables -A FORWARD -i venet0 -o ppp0 -j ACCEPT
iptables -A FORWARD -i ppp0 -o venet0 -j ACCEPT

and


iptables -t nat -A POSTROUTING -o ppp0 -s 10.0.0.0/24 -j MASQUERADE
To rename packets from the VPN network to VM network (my VM network is 10.0.0.X and my VPN network is 192.168.2.X).

Et voilà !

Thank you very much for Proxmox OS, it's wonderful !

Rhode
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!