Answer

To create a GRE PPTP tunnel inside a container, the following steps should be followed:

  1. Ensure that ip_gre and nf_conntrack_proto_gre modules are loaded on the node:

    # lsmod | egrep 'ip_gre|nf_conntrack_proto_gre'
    

    If they are not present, load them manually.

    # modprobe ip_gre
    # modprobe nf_conntrack_proto_gre
    

    If it is needed to load them automatically on boot, configure it in accordance with the corresponding OS instructions:

  2. Configure TUN/TAP devices inside the container
  3. Configure the container to support PPP device with ipgre feature:

    # vzctl set <CTID> --save --devnodes "ppp:rw net/tun:rw" --features "ppp:on ipgre:on"
    
  4. Configure the container to load ip_gre iptables module:

    • For Virtuozzo hypervisor(PSBM5) and Virtuozzo Containers 4.7 and earlier versions.

      # vzctl set <CTID> --save --iptables ip_gre
      
    • For Virtuozzo Server 6.0

      # prlctl set <CTID> --save --netfilter full
      

    For more detailed information on configuring iptables modules in containers, check this article

Note: ip_gre module is virtualized since CU-2.6.18-028stab064.4.

Internal content