Tag: sbin

Monitoring bandwidth of containers

Use the /proc/net/dev inside a container, dump stats into a round robin database (rrd) #!/bin/bash # # Bandwidth collection script for OpenVZ by Eric ‘phpfreak’ Rosebrock # http://www.serverpowered.com / http://www.thewebfreaks.com # Please read: http://www.serverpowered.com/openvz-bandwidth-accounting.php # # # No warranties on this script, use it at your own risk! # # […]

Configure passive ports range for ProFTPd

Usually, if a client is behind firewall, they can only trasfer files via a passive ftp connection. Edit /etc/proftpd.conf and specify the passive ports range. Place it in the ‘Global’ container:   </Global> … … # Use the IANA registered ephemeral port range PassivePorts 49152 65534 </Global> Reference: proftpd.org Load […]

VPS login problem: enter into Container VEID failed

You may receive the following message on accessing a VPS from the host server: # vzctl enter 101 enter into VE 101 failed Unable to open pty: No such file or directory The reason behind is the missing tty/pty files OR the udev devices. There are two ways of creating […]

Auto restart apache on segmentation fault error

Recently a particular folder in a site started coming up with blank php pages and the root cause being Segmentation fault after memory exhaustion. The subfolder contents would only come up after doing a restart of apache. So something tried to access a region of memory that it did not […]

How to find MAC address in CentOS

Open SSH and type the following and press Enter: /sbin/ifconfig | grep -i hwaddr The sequence of hexadecimal digits that appears to the right of eth0 HWAddr (e.g. 08:00:27:ED:DA:8b) is your network card’s MAC Address} else {

Ftp: 425 Unable to build data connection

Error Message: LIST 425 Unable to build data connection: Connection timed out PASV 227 Entering Passive Mode (xx,xx,xx,xx,xx,xxx). connecting data channel to xx.xxx.xx.xxx:54963 The above error message is received while you Ftp to an account successfully but it does not list the files and directories within it. The reason for […]

Linux: Block Port With IPtables

How do I block port number with iptables under Linux operating systems? Port numbers which are recognized by Internet and other network protocols, enabling the computer to interact with others. Each Linux server has a port number (see /etc/services file). For example: TCP port 80 – HTTP Server TCP port […]

Bridge Networking On OpenVZ Containers Using VETH Devices

1. Host will be open on LAN and guests on WAN. Additionally, there is a bridged LAN for guests. 2. We will be using bridge networking for protecting the Host Network and saving IP addresses, also giving flexibility with the guest network setup. 3. Configure LAN Eth1 port to 192.168.1.2 […]