Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

problem to set up vpn in my openvz vps.

2»

Comments

  • @guyusoftware I am afraid it could be an kernel related issue.

  • Are you sure that the iptable_nat module is listed in your /etc/vz/vz.conf?

    Something to check.

  • @DannyAlex I am also afraid that if there is an issue related to ovzkernel. Fortunately, there only occur vpn problem.
    @Wintereise already in it.

  • SpeedBusSpeedBus Member, Host Rep

    Do you have the PPP kernel module enabled on the host node ? There's a guide to do it on the openvz wiki.

  • @SpeedBus Already enabled. Everything settings seem alright now but also has problem.

    [root@test ~]# cat /dev/net/tun
    cat: /dev/net/tun: File descriptor in bad state
    [root@test ~]# cat /dev/ppp
    cat: /dev/ppp: No such device or address

  • 
    sudo mknod /dev/ppp c 108 0
    sudo chmod 600 /dev/ppp
    
    

    Run those two commands on the CT to create the PPP device, it's not magically created.

  • MaouniqueMaounique Host Rep, Veteran

    There are a few scripts floating around to setup those VPNs on OVZ.
    You may wish to look at one of them to see what it does.

  • If those commands were run, something would at least exist at /dev/ppp.

    You're doing something wrong. What that is, well, rather hard to say without having any idea.

  • SpeedBusSpeedBus Member, Host Rep
    edited December 2012

    @guyusoftware said: @SpeedBus Already enabled. Everything settings seem alright now but also has problem.

    [root@test ~]# cat /dev/net/tun

    cat: /dev/net/tun: File descriptor in bad state
    [root@test ~]# cat /dev/ppp
    cat: /dev/ppp: No such device or address

    Tun is enabled, PPP is not.
    They both are different, Tun = OpenVPN and PPP = PPTP.

    Try This,
    On Host Node,

    modprobe ppp_async
    modprobe ppp_deflate
    modprobe ppp_mppe
    

    Then,

    lsmod | grep ppp

    You should see the following (in any order is okay)

    ppp_mppe                6420  2
    ppp_deflate             9793  2
    zlib_deflate           21977  1 ppp_deflate
    ppp_async              15169  1
    crc_ccitt               6337  1 ppp_async
    ppp_generic            30165  6 ppp_deflate,ppp_async
    slhc                   10561  1 ppp_generic
    

    After which (One by One, In order)

    vzctl set [VEnumber] --features ppp:on --save
    vzctl start [VEnumber]
    vzctl set [VEnumber] --devices c:108:0:rw --save
    vzctl exec [VEnumber] mknod /dev/ppp c 108 0
    vzctl exec [VEnumber] chmod 600 /dev/ppp
    

    Now to see if it works,

    vzctl enter [VEnumber] 

    Then,

    /usr/sbin/pppd
    

    You'll see some text like,

    ~�}#�!}!}!} }4}"}&} } } } }%}&)Q�}4}'}"}(}"p})
    

    This will go on for about 30 seconds and then you will be returned to a command prompt. If there is an error message instead, something went wrong.

  • @SpeedBus Thanks a lot. Okay now. :)

  • SpeedBusSpeedBus Member, Host Rep

    @guyusoftware said: @SpeedBus Thanks a lot. Okay now. :)

    No probs :)

Sign In or Register to comment.