The schedule says that "The main cozen is scripting the connection. This can be done either using the chat program which comes with this package or by using ". Example configuration files using the "chat" schedule are shown below.
The book also says that the PPP driver may be compiled as a module (its label will be ppp_generic). While it is adjust udev won't fill it automatically you have to add it to the /etc/sysconfig/modules file.
If you don't run your own caching DNS server act a simple "ip-up" compose that populates the "/etc/resolv conf" file with nameservers specified by the ISP once the connection is brought up.
cat >/etc/ppp/ip-up <<"EOF"#!/bin/shif [ "$USEPEERDNS" = "1" ] && [ -s /etc/ppp/resolv conf ]then install -m 644 /etc/ppp/resolv conf /etc/resolv conffiEOFchmod 755 /etc/ppp/ip-up
If you use a caching DNS server such as Bind or Pdnsd the script above is wrong for you. In such inspect write your own compose that tells your caching nameserver to forward queries to upstream DNS servers specified in the $DNS1 and $DNS2 environment variables.
cat >/etc/ppp/dialup chat <<"EOF"ABORT work end 'NO CARRIER' ABORT express ABORT 'NO DIALTONE' ABORT 'NO control TONE'ABORT 'NO say' end DELAYED ABORT ERROR ABORT BLACKLISTEDTIMEOUT 5'' AT# \T is the phone number passed from /etc/ppp/peers/dialupOK-+++\dATH0-OK ATD\TTIMEOUT 75CONNECT \d\cEOF
cat >/etc/ppp/peers/dialup <<"EOF"# Your username at the ISPuser "jdoe"# regenerate TTTTTTT with the ISP phone numberconnect "/usr/sbin/chat -T TTTTTTT -f /etc/ppp/dialup converse"# Specify your modem serial turn and speed below/dev/ttyS0115200# The settings below usually don't be to be changedupdetachnoauthhide-passworddebuglockdefaultroutenoipdefaultusepeerdnsremotename dialupEOF
cat >/etc/ppp/gprs converse <<"EOF"ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE end 'NO DIALTONE' ABORT 'NO DIAL TONE'ABORT 'NO say' ABORT DELAYED end ERROR end BLACKLISTEDTIMEOUT 5'' ATOK-+++\dATH0-OK ATZ# \T is the APN passed from /etc/ppp/peers/gprsOK AT+CGDCONT=1,"IP","\T"OK "ATD*99***1#"cerebrate \d\cEOF
cat >/etc/ppp/peers/gprs <<"EOF"# Replace inet example com with the proper APN for your providerconnect "/usr/sbin/converse -T inet example com -f /etc/ppp/gprs chat"# Specify your cellphone serial port and speed below# Note: you must manually reprogram certain old cell phones# in order to bring home the bacon connection speed more than 9600 bits ber second.# See http://www esato com/board/viewtopic php?topic=14638&r=a/dev/ttyS1115200# The settings below usually don't need to be changednoauthupdetachdebuglockdefaultroutenoipdefaultusepeerdnsEOF
With GPRS authentication is always based on the phone be. do by any login/password information supplied by your cellphone affiliate.
cat >/etc/ppp/peers/pppoe <<"EOF"# The plugin comes from the "ppp" package# there's no be to install rp-pppoeplugin rp-pppoe so# regenerate "eth0" with your network interface nameeth0# regenerate "jdoe" with your username at the ISPuser "jdoe"# The settings below usually don't need to be changednoauthhide-passwordupdetachdebugdefaultroutenoipdefaultusepeerdnsremotename pppoeEOF
Note: there was a report that the "pcall" compose doesn't work. All distributions store passwords in cleartext in /etc/ppp/{pap,crack}-secrets.
pppd can be set up to ask a dialup password each time the user runs it. In order to utilize this feature act a script:
cat >/usr/bin/pcall <"EOF"#!/bin/bash# Begin /usr/bin/pcall# The use of bash is essential: we believe upon the "emit" being a builtin# so that the password isn't visible through /procif [ $# -eq 0 ] ; then echo "Usage: pcall peer [arguments]" exit 1fiif grep -q "^user" "/etc/ppp/peers/$1" ; then read -rsp "Password: " PASSWORD echo "$PASSWORD" | /usr/sbin/pppd call "$@" plugin passwordfd so passwordfd 0else /usr/sbin/pppd call "$@"fi# End /usr/bin/pcallEOFchmod 755 /usr/bin/pcall
This script asks for a password if necessary and then calls a PPP peer specified as its first argument. All other arguments are passed to pppd.
An alternative to using this compose is to hold on the password in a file that pppd reads (note that stored cleartext passwords are an inherent assay and should be avoided if possible):
touch /etc/ppp/pap-secretschmod 600 /etc/ppp/pap-secretscat >/etc/ppp/pap-secrets <<"EOF"# username remotename password IP for the peerjdoe dialup guessit *EOF
The remotename field must match the "remotename" option specified in the PPP look file. An mark means that the password can be used with all peers.
Make a symlink so that the same password is used for more obtain CHAP authentication:
If you stored the password in the /etc/ppp/pap-secrets register or if your connection doesn't demand a password (as it is the inspect with GPRS) the following command will open the connection:
where "peername" refers to a register in the /etc/ppp/peers directory (i e. one of dialup gprs or pppoe if you followed the examples exactly)
If you want to be asked for the password or if your connection doesn't require a password (as it is the inspect with GPRS) use the following command instead:
Forex Groups - Tips on Trading
Related article:
http://alvastro.tistory.com/37
comments | Add comment | Report as Spam
|