Problem: connect to the Internet via mobile phone and GPRS using USB-adapter Prolific PL2303 under Linux.
Solution: there are enough tools in Debian to do so.
(...)
Read the rest of GPRS in Debian GNU/Linux with mobile phone Siemens ME45 (748 words)
© virens for Debian Admin, 2008. | Permalink | No comment
Add to del.icio.us
Search blogs linking this post with Technorati
Want more on these topics ? Browse the archive of posts filed under General.
---
Related Articles at Debian Admin:
Debian: Debian Admin Step By Step Tutorials and articles with screenshots
The Network Time Protocol (NTP) is a protocol for synchronizing the clocks of computer systems over packet-switched, variable-latency data networks. NTP uses UDP port 123 as its transport layer. It is designed particularly to resist the effects of variable latency (Jitter).
Using NTP is a great way to keep your system clock set correctly. It works by contacting a number of servers around the world, asking them for the time and then calculating what the correct local time is from their responses.
Install NTP server in Debian
#apt-get install ntp ntpdate ntp-server
This will install all the required packages for NTP
Configuring NTP Server
By Default main configuration file located at /etc/ntp.conf
Default configuration file looks like below
#/etc/ntp.conf, configuration for ntpd
driftfile /var/lib/ntp/ntp.drift
statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
# You do need to talk to an NTP server or two (or three).
#server ntp.your-provider.example
# pool.ntp.org maps to more than 300 low-stratum NTP servers.
# Your server will pick a different set every time it starts up.
# *** Please consider joining the pool! ***
# *** ***
server 0.debian.pool.ntp.org iburst
server 1.debian.pool.ntp.org iburst
server 2.debian.pool.ntp.org iburst
server 3.debian.pool.ntp.org iburst
# By default, exchange time with everybody, but don't allow configuration.
# See /usr/share/doc/ntp-doc/html/accopt.html for details.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1
# Clients from this (example!) subnet have unlimited access,
# but only if cryptographically authenticated
#restrict 192.168.123.0 mask 255.255.255.0 notrust
# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255
# If you want to listen to time broadcasts on your local subnet,
# de-comment the next lines. Please do this only if you trust everybody
# on the network!
#disable auth
#broadcastclient
Example Configuration
You need to add a number of servers to the server list. The Debian default is pool.ntp.org which works but isn’t always amazingly accurate because it makes no attempt to use time servers near you. If you want more accuracy use the time servers either on your continent (for instance europe.pool.ntp.org) or your country (for instance uk.pool.ntp.org) one of your local country servers.The optimal number of servers to listen to is three but two will also give a good accuracy. If your ISP runs a time server for you it is worth including it in your server list as it will often be more accurate than the pooled servers and will help keep the load down on the pool.
I am using the following two servers for my configuration
server ntp0.pipex.net
server ntp1.pipex.net
Restrict the type of access you allow these servers. In this example the servers are not allowed to modify the run-time configuration or query your Linux NTP server.
restrict otherntp.server.org mask 255.255.255.255 nomodify notrap noquery
restrict ntp.research.gov mask 255.255.255.255 nomodify notrap noquery
The mask 255.255.255.255 statement is really a subnet mask limiting access to the single IP address of the remote NTP servers.
If this server is also going to provide time for other computers, such as PCs, other Linux servers and networking devices, then you’ll have to define the networks from which this server will accept NTP synchronization requests. You do so with a modified restrict statement removing the noquery keyword to allow the network to query your NTP server. The syntax is:
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
In this case the mask statement has been expanded to include all 255 possible IP addresses on the local network.
We also want to make sure that localhost (the universal IP address used to refer to a Linux server itself) has full access without any restricting keywords
restrict 127.0.0.1
Save the file and exit
Now you need to run the ntpdate command against your server
#ntpdate ntp0.pipex.net
restart NTP for these settings to take effect using the following command
#/etc/init.d/ntp restart
You can now configure other Linux hosts on your network to synchronize with this new master NTP server in a similar fashion.
Determining If NTP Is Synchronized Properly
Use the ntpq command to see the servers with which you are synchronized. It provided you with a list of configured time servers and the delay, offset and jitter that your server is experiencing with them. For correct synchronization, the delay and offset values should be non-zero and the jitter value should be under 100.
#ntpq -p
Output looks like below

A star by any one of the names means that the system clock is synchronising with the NTP clock. If you don’t have a star (as in the example above) it means that the clocks are unreachable, already synchronized to this server or has an outrageous synchronization distance. Try running ntpdate (you will need to stop the ntp server) with your first ntp server as an argument. This will set your system clock fairly accuratly and mean that the server will be able to choose a clock to synchronize with.
Firewall Configuration for NTP
NTP servers communicate with one another using UDP with a destination port of 123. Unlike most UDP protocols, the source port isn’t a high port (above 1023), but 123 also. You’ll have to allow UDP traffic on source/destination port 123 between your server and the Stratum 1/2 server with which you are synchronizing.
NTP Client Configuration
If you want to configure ntp client you need to install the following packages
#apt-get install ntp ntp-simple ntpdate
Configuring NTP client
You need to edit the /etc/ntp.conf file you need to point the following settings to NTP server ip address
Server configuration settings
server 192.168.1.1
Restrict the type of access you allow these servers. In this example the servers are not allowed to modify the run-time configuration or query your Linux NTP server.
restrict default notrust nomodify nopeer
Localhost configuration
restrict 192.168.1.1
In this case the mask statement has been expanded to include all 255 possible IP addresses on the local network.
We also want to make sure that localhost (the universal IP address used to refer to a Linux server itself) has full access without any restricting keywords
restrict 127.0.0.1
Now you need to save and exit the file
run ntpdate command against your server
ntpdate 192.168.1.1
Restart ntp service using the following command
/etc/init.d/ntp restart
If you use the date command to change time, it is worth setting also the hardware clock to the correct time. Otherwise, the time is wrong after the next reboot, since the hardware clock keeps the time when power is turned off. When the clock in the operating system shows the correct time, set the hardware clock like this
#hwclock --systohc
se the ntpq command to see the servers with which you are synchronized
#ntpq
#ntpdc -p
Tags: configure ntp server, configuring ntp client debian, firewall configuration for ntp, install ntp client in debian, install ntp server debian, ntp server debianconfigure ntp server, configuring ntp client debian, firewall configuration for ntp, install ntp client in debian, install ntp server debian, ntp server debian
Debian: Debian Admin Step By Step Tutorials and articles with screenshots
The Common UNIX Printing SystemTM, or CUPS, is the software you use to print from applications like the web browser you are using to read this page. It converts the page descriptions produced by your application (put a paragraph here, draw a line there, and so forth) into something your printer can understand and then sends the information to the printer for printing.
Now, since every printer manufacturer does things differently, printing can be very complicated. CUPS does its best to hide this from you and your application so that you can concentrate on printing and less on how to print. Generally, the only time you need to know anything about your printer is when you use it for the first time, and even then CUPS can often figure things out on its own.
Install CUPS printer server in Debian
#apt-get install cupsys cupsys-driver-gutenprint foomatic-db-gutenprint foomatic-filters fontconfig libtiff4 libfreetype6
NOTE:- If your network use DHCP it’s a good idea to set up your server to use static IP. I will use as 172.20.22.74 for the server and 172.20.22.150 for administration workstation.
Configure CUPS
Default configuration file located at /etc/cups/cupsd.conf in this file you need to configure the following sections to make it work.
First, check the encryption setting and change
# Default authentication type, when authentication is required…
DefaultAuthType Basic
to
# Default authentication type, when authentication is required…
DefaultAuthType Basic
DefaultEncryption IfRequested
Then we need to tell it to listen for the server change
# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock
to
# Only listen for connections from the local machine.
Listen localhost:631
Listen 172.20.22.74
Listen /var/run/cups/cups.sock
We need it to be visible to the entire network
# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow @LOCAL
what machines that may access the server change
# Restrict access to the server…
<Location/>
Order allow,deny
Allow localhost
</Location>
to
# Restrict access to the server…
<Location/>
Order allow,deny
Allow localhost
Allow 172.20.22.*
</Location>
And the same for the configuration files change
# Restrict access to configuration files…
<Location /admin/conf>
AuthType Basic
Require user @SYSTEM
Order allow,deny
Allow localhost
</Location>
to
# Restrict access to configuration files…
<Location /admin/conf>
AuthType Basic
Require user @SYSTEM
Order allow,deny
Allow localhost
Allow 172.20.22.150
</Location>
Other configuration i left default one so need to change anything.
Now you need to restart CUPS using the following command
#/etc/init.d/cupsys restart
You should now be able to connect to the CUPS web interface from the administrator workstation (IP 172.20.22.150 in this example) by pointing your web browser at http://172.20.22.74:631/ once it opens you should see the following screen

If you got the correct drivers installed and your printer is connected to the server, Now you need to add your printer under the “Administration” tab.Setup your printer and finish the setup and verify that it works by printing the CUPS test page.

Setting up the CUPS clients
The CUPS clients are easy to set up and the config is identical on all machines.You need to install the following packages for client
#apt-get install cupsys cupsys-client
Configuring CUPS Client
You need to create /etc/cups/client.conf as root
#touch /etc/cups/client.conf
Now you need to edit the /etc/cups/client.conf file
#vi /etc/cups/client.conf
Enter the following information the server IP and the encryption requirement
# Servername
ServerName 172.20.22.74
# Encryption
Encryption IfRequested
Save the file, then restart the client
#/etc/init.d/cupsys restart
Adding Printers
Now you need to add printer in GNOME go to Desktop—>Administration—>Printing

Once it opens you should see the following screen

Select Printer—>Add printer

Once it opens you should see the following screen

In the above screen select Network Printer option,select CUPS Printer and enter the URl and click on Forward

Select your printer manufacturer and model or install printer drivers and click on apply

After finishing the setup you should see the similar to the follwoing screen now your printer is ready for printing.

Tags: configure cups server debian, configuring cups client debian, cups printer debian, install cups printer debian, Install CUPS printer server in Debianconfigure cups server debian, configuring cups client debian, cups printer debian, install cups printer debian, Install CUPS printer server in Debian
Debian: Debian Admin Step By Step Tutorials and articles with screenshots
ProFTPD is a proven, high-performance, scalable FTP server written from scratch, with a focus toward simplicity, security, and ease of configuration. Naturally, ProFTPD powers some of the largest sites on the Internet. It features a very Apache-like configuration syntax, modules, and a highly customizable server infrastructure, including support for multiple ‘virtual’ FTP servers, anonymous FTP, and permission-based directory visibility.
phpftpwho is a program written in PHP that tells you the status of your local FTP server. It uses the unix/linux command ftpwho and formats and displays the information. The program is licensed under the GPL license.
phpftpwho Requirements
A webserver, Apache is a great one.
A recent version of PHP.
The FTP server Proftpd.
A Unix/Linux operating system.
Install Apache Webserver with PHP Support
If you want to install Apache Webserver with PHP Support check here
Install Proftpd Server
If you want to Install Proftpd Server check here
Install phpftpwho
Note :- phpftpwho must be installed on the same machine that is running Proftpd server.
Download phpftpwho from here using the following command in apache web server root document folder (/var/www)
#wget http://www.rivetcode.com/files/phpftpwho/phpftpwho-0_9.tar.gz
Now you have tar.gz file you need to extract using the following command
tar xzvf phpftpwho-0_9.tar.gz
Now you should be having phpftpwho folder in your apache root document folder(/var/www)
If you want to access your phpftpwho program you need to go to http://yourserverip/phpftpwho
Now you need to login into the ftp server and refresh your phpftpwho page you should see similar to the following screen

Security configuration
If you want to configure security for phpftpwho you need to create a .htaccess file under phpftpwho folder in /var/www/ so that any one who is trying to access this page it will prompt for username and password.
Tags: configuring phpftpwho, monito proftp server, monitor ftp server, phpftpwho in debianconfiguring phpftpwho, monito proftp server, monitor ftp server, phpftpwho in debian
Debian: Debian Admin Step By Step Tutorials and articles with screenshots
Debian: Debian Admin Step By Step Tutorials and articles with screenshots
Debian: Debian Admin Step By Step Tutorials and articles with screenshots
Database
Debian
Ubuntu
MySQL
and
installation
in
configuring