PPTP VPN and GRE on VPS with Openvz

Sometimes PPTPd would work and sometimes won’t.
When you see in the logs:

GRE: xmit failed from decaps_hdlc: Operation not permitted
CTRL: PTY read or GRE write failed (pty,gre)=(6,7)

We tell iptables to open the INPUT chain of the filter for the GRE protocol.

iptables -t filter -A INPUT -p gre -j ACCEPT

Not possibly get access to certain site with PPTP VPN on Debian VPS

After setup pptp vpn tunnel on Debian VPS ( pptpd ), you can access most of sites without errors. But if you find you can’t open some sites like: www.marca.com, then this is more like a tcp mss size error. You should ssh into your VPS erver, and run the command:

iptables -I FORWARD -p tcp --tcp-flags SYN,ACK,RST SYN -i ppp+ -j TCPMSS --set-mss 1356 

Detecting OpenVZ environment

Reliably detecting if there is an OpenVZ Environment is pretty easy:

Just check for existance of /proc/user_beancounters.

But this will only tell you that OpenVZ is there. It won’t tell you, if you are inside an unprivileged Virtual Environment (VE) or on the privileged Hardware Node (HN or VE0).
Still an easy check:

Read /proc/$PID/status and check for “envID: $VEID”. $VEID will be 0 for the Hardware Node (hence the VE0 name). If it’s greater than 0, you are inside an unprivileged VE.

Facter 1.5.3 will probably have support for this.

Convert x264 (mkv file) into XVid with FFMPEG.

Example:

 ffmpeg -i Lockout.2012.x264.BDRip.720p.DUB.mkv -threads 4
        -vf scale=720:576 -aspect 2.40 -c:v libxvid -r:v 24
        -q:v 3 -c:a libmp3lame -ac 2 -ar 44100 -ab 128k -y Lockout.avi

Extra Packages for Enterprise Linux (EPEL)

Home page: http://fedoraproject.org/wiki/EPEL

RHEL 6
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
RHEL 5
# rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
RHEL 4
# rpm -Uvh http://download.fedoraproject.org/pub/epel/4/i386/epel-release-4-10.noarch.rpm

 

Scroll to top