Linux Hosting and a VM Answering Machine

. Saturday, November 3, 2007
0 comments

Linux Hosting and a VM Answering Machine

Following these instructions should let you setup your Linux Host as an Answering Machine.

Please read the following HOWTO carefully and modify the lines where
needed. Be careful when working as root. Take care to make backup copies of any file before editing/changing it, so you can at least restore it back to the previous state in case something does not work.
The requirements

1. A Working Phone Line

2. A Modem working on a Linux Host
The modem should be a data-fax-voice modem
3. A Microphone ( To record the greeting message )

4. mgetty installed
Linux Hosting - Debian: you need to have mgetty and mgetty-voice packages
Linux Hosting - RedHat: you need to have mgetty+sendfax package installed
As a matter of fact you should have two files
they are
(i) vgetty ( in Debian /usr/sbin/vgetty and in RedHat /sbin/vgetty )
(ii) voice.conf ( /etc/voice.conf in both the distros )


Installation

Mgetty is available at it's Home Page

http://alpha.greenie.net/mgetty/

Vgetty Mirror Sites

http://www.coinet.com/~griz/vgetty
http://www.yeolde.com/~surfgriz/vgetty
http://www.okom.net/~vgetty
http://www.ciredata.com/~vgetty

1. Compile and install mgetty. See the instructions for mgetty how to do that.

2. Compile vgetty. There should be nothing special to do. Just type "make" from within the voice directory. If you managed to compile mgetty, you should be able to compile vgetty without any
problems.

3. Do "make install" as root from within the voice directory. Since you are always concerned about hackers, wanting to overtake your system, you will first do a "make -n install" to see all the evil things, the installation procedure will do.

Configuration

1.Copy the file voice.conf-dist to the same directory as all the mgetty config files. Rename it from voice.conf-dist to voice.conf. This file contain the description of the vgetty config option ... so read it.

So first see to it that you have the necessary files installed, I mean the vgetty executable and the vgetty configuration file voice.conf.

2.voice.conf most probably resides in /etc/mgetty or /etc/mgetty+sendfax

If you have installed vgetty from a tarball then the conf file
may be somewhere in /usr/local/lib or /usr/local/etc

In case you don't find the voice.conf file, then it must be there as
voice.conf.dist file in the /usr/doc/mgetty-* dir
copy it to /etc/*mgetty-dir* and start editing

Coming back to editing the voice.conf file, you need to edit three lines in the whole of the conf file

Now open voice.conf with your favourite editor ( I use vi ).

First search for the line

voice_devices

Change it to :- voice_devices your_modem_device

my config is as follows:
voice_devices ttyS1 /* ttyS1 is my modem's device ( My modem is on COM2 ) */

then search for the line

rings 5
or a similar line

Change this line to :- rings number_of_rings_after_which_you_want_the_modem_to_answer

I put this line to the default value of rings 5

so I have this line as
rings 5

then search for the line

port ttyS0
or a similar line

change this line to :- port your_modem_device

so I have the line

port ttyS1
in my configuration file

3. Ready for the recording Huh?

Please approach your nearest recording centre....
Ooops !! Sorry for the mistake !!

Record your greeting message. There are many ways to do that :

a.Using vm Linux Host:
Connect your microphone to the mic port of your modem
record your message with "vm record -m standard.rmd".
And record your message. The file is stored as standard.rmd
This can be done using internal microphone or local handset (type vm to see options)

b. Using an already recorded voice file :
you just have to convert your sound file in the modem expected format using the pvf
tools.
Eg : convert a voc file to Rockwell (compression type 4) format voctopvf file.voc |
pvftormd Rockwell 4 > standard.rmd

(Replace Rockwell by what you need type pvftormd -h for detail)

Be sure to make the voice_dir directories in the Linux host specified in your voice.conf file (e.g., /var/spool/voice,
/var/spool/voice/incoming and /var/spool/voice/messages).

Make sure you copy the file standard.rmd file /var/spool/voice/messages

4. Replace the invocation of mgetty in your /etc/inittab with vgetty if there is one. If there is no mgetty
invocation you just have to insert a line like that: "S1:345:respawn:/usr/local/sbin/vgetty ttyxx" in your
/etc/inittab file.
where ttyxx is your modem device and replace /usr/local/sbin/vgetty with the
proper path to vgetty like /sbin/vgetty or /usr/sbin/vgetty
(like that vgetty is running at runlevels 3 4 and 5 see inittab(5) man page for more)

5. With Linux Hosting, the vgetty logfiles are by default in /var/log/vgetty.ttyxx.log and the vm logfile is in /var/log/vm.log. Read these files if you have problems, they are quite readable and give you many hints, where the problem is. If you want to see more details in the logfile, increase the debug level in your voice.conf file to the highest possible value.

Using vgetty

Once you've rebooted vgetty is lauched at init and will answer incoming call. Incoming messages are
stored in receive_dir (see voice.conf)

1. playing incoming messages using Linux Hosting

Go to the incoming messages dir ( /var/spool/voice/incoming )

a. using vm :
play the message with "vm play -s file_name.rmd" (type vm to see options)
You can hear the message thro the speaker of your modem

b. using audio card and sox :
rmdtopvf file.rmd | pvfspeed -s 8000 | pvftobasic > /dev/audio (see rmdtopvf -h and rmdtopvf
-L for more)

Turn a Linux machine in to Router

.
0 comments

It is very easy to Convert a Linux system in to a Software based router.

Do this,

edit "/etc/sysctl.conf"

eg: #vi /etc/sysctl.conf
#Controls IP packet forwarding
net.ipv4.ip_forward = 0.......>Change This line to

net.ipv4.ip_forward = 1

Turn a Linux machine in to Router

.
0 comments

It is very easy to Convert a Linux system in to a Software based router.

Do this,

edit "/etc/sysctl.conf"

eg: #vi /etc/sysctl.conf
#Controls IP packet forwarding
net.ipv4.ip_forward = 0.......>Change This line to

net.ipv4.ip_forward = 1

Remote backup with tar and ssh

.
0 comments

A short script can make it for you via ssh.
Advantages : esay to understand, secured, pretty fast,
no problem with 300 MBytes .tar files
between a 6x86 (64 Mo RAM) and a 486 (8 Mo RAM)


#!/bin/bash
# Backup from SYS1 to SYS2

cd /

list="home/www home/www2 etc var"

for file in $list
do
#Keep the previous backup
tgz=`echo $file | sed -e 's/\//_/g'`;
old="${tgz}.old";
#Store the old backup
ssh SYS2 "mv -f /home/backup/SYS1/$tgz /home/backup/SYS1/$old";
#SYS2 is a i486... be patient !
sleep 5m
#THE ligne that makes everything
tar -cz $file/* | ssh SYS2 "cat - > /home/backup/SYS1/$tgz";
sleep 5m
done


[ Note : both computers have to trust themselves so that
ssh won't ask for a password. See man ssh and man sshd for how to do that. ]

Hide a partition in your system that have both Linux and Windows OS

.
0 comments

Do you want to Hide a partition in your system that have both Linux and Windows OS

Easy way to Hide a Linux or windows partition with GRUB


add these lines to your "/boot/grub/grub.conf"


title WINDOWS
hide(hd0,5) ##Hiding Partition No: 6
rootnoverify (hd0,0)
chainloader +1
make active



To Unhide:
1) Delete The line hide(hd0,)
2) Use the command unhide(hd0,)

IPV6 : Configuring For RedHat

.
0 comments

The following works on Redhat 8.0. It should be almost identical in Redhat 7.3. Take a look at the docmentation in /usr/share/doc/initscripts-6.95 for more details.
In /etc/sysconfig/network we enable IPv6 support and support for the 6to4 tunnelling by adding the following lines:

NETWORKING_IPV6=yes
IPV6_DEFAULTDEV=tun6to4


In /etc/sysconfig/network-scripts/ifcfg-{devname} we need to enable IPv6. This device will be the device on which the tunnel IPv6 traffic travels over. So this could be a ppp device or an eth device. NOTE: I do not think ippp device (ISDN) are supported at the moment. We enable IPv6 be adding:

IPV6INIT=yes
IPV6TO4INIT=yes
IPV6TO4_RELAY="192.88.99.1"


Additional steps for ppp devicesIf the 6to4 device is a ppp device then extra configuration is needed
In /etc/ppp/ip-up.local a call to the IPv6 configuration scripts needs to be added:

/etc/ppp/ip-up.ipv6to4 $1

In /etc/ppp/ip-down.local a call to the IPv6 configuration scripts needs to be added:

/etc/ppp/ip-down.ipv6to4 $1

And finally if the local IP address of the device is not configured in the ifcfg-ppp{unit} file then you need to ensure that the real linux device always matches the {unit} number. I fyou only have one ppp device then this will be true as the device will always be called ppp0. If you have more than one device then I recomend renaming it to something with a higher unit number (5 for example) and the forcing it to use that unit number by adding the following to /etc/sysconfig/network-scripts/ifcfg-{devname}

PPPOPTIONS="unit {unit}"

for ppp devices, or

PPPD_EXTRA="unit {unit}"


for pppoe devices.

MikroTik RouterOS™ 2.9.27 with Winbox and Dude 2.2

.
0 comments

MikroTik RouterOS™ is a router operating system and software which turns a regular PC into a dedicated router.
Image Hosted by ImageShack.us


RouterOS Features

  • Router
  • Bandwidth Manager
  • Firewall
  • HotSpot Gateway
  • VPN Server/Client
  • Wireless AP/Router
  • all in one box

Applications
  • Firewall
  • ISP backbone router
  • HotSpot Gateway
  • Dial-In Server
  • Dial-Out Server
  • Bandwidth shaper
  • Traffic logger

Included Winbox and Dude 2.2 For the purpose of managing and maintaining.




Download:


http://tinyurl.com/393rfg