Next Previous Contents

2. Sundesh me ton ejw kosmo

S'ayto to keimeno, 8a ejhghsoyme pws na to kanete ayto xrhsimopoiwntas to PPP (Point to Point Protocol), ena dhmofiles prwtokollo poy sxedon panta xrhsimopoieitai sto Internet. Epitrepei sto modem sas na milaei ston ejw kosmo. Ayto kanei oti ekanan kai oi efarmoges Trumpet Winsock sta Windows 3.x, kai polla alla programmata poy pi8ana na mhn exete dei pote.

Sto Linux, xrhsimopoioume ena programma poy legetai chat gia na kalesoyme ton ISP kai meta xrhsimopoioume th boh8htikh efarmogh pppd gia na "xrhsimopoihsoyme" th sundesh. Kata mia ennoia, to chat einai o dialer, kai to pppd to prwtokollo. 8a perigracoyme pws ginetai h egkatastash parakatw.

2.1 Milwntas kai epikoinwnwntas me to pppd kai to chat

Pi8ana o eykoloteros tropos gia ayta ta pragmata einai na ftiajete ena script floiou ston home katalogo toy root poy na legetai ppp-connect kai na energopoieite ayto to script otan 8elete na kanete sundesh. 8a syzhthsoyme th me8odo ayth.

Anoijte ton agaphmeno sas dior8wth (editor) san root me to  /ppp-connect. 8a prepei twra na apofasisete gia orismenes parametroys.

pppd connect 'chat -v "" "h grammh arxikopoihshs toy modem" "" ATDTari8mos_toy_ISP CONNECT "" ogin: to_username_sas : to_passwd_sas' /dev/tty(0/1/2) taxuthta_modem

To pppd kalei to /usr/sbin/pppd sto susthma moy, sthn synexeia "fortwnei" to chat gia na diekperaiwsei thn klhsh. To chat stelnei th grammh arxikopoihshs toy modem sto modem, meta kalei to ATDTari8mos_toy_ISP. Sth synexeia perimenei gia sundesh, meta perimenei gia ogin: (to l einai sbhsmeno giati merikes fores o prwtos xarakthras xanetai), stelnei to_passwd_sas, to chat meta, termatizei, kai metaferei thn doyleia sto pppd.

H teleytaia apo tis entoles orizei th 8ura (port) sto modem sas (to diko moy einai /dev/ttyS1). Stis perissoteres periptwseis einai to ttyS1 (COM2: sto DOS), ttyS0 (COM1: sto DOS), h an xrhsimopoieite Slackware, cua1 h cua0. Speed einai h taxuthta toy modem. Egw xrhsimopoiw 115200 gia to diko moy modem (33.6k). Ean exete ena sxetika kainourgio ypologisth (me 16550 UART), tote egw den 8a ebaza ligotero apo 57600. Alliws, gia taxuthta 14.4k balte 38400. To modem apla leei sto pppd oti einai mia sundesh basismenh se seiriako modem. Sbhste to -v ean den 8elete na analytikh katagrafh sta logfiles sas.

To parakatw senario einai enos an8rwpoy poy kalei enan ISP o opoios jekina aytomata to PPP, px. sthn pragmatikothta den yparxei kapoio kelyfos (shell) poy na arxizei . Ayth einai h entolh toy sto  /ppp-connect toy:

pppd connect 'chat "" "ATZ" "" ATDT555-1800 CONNECT "" ogin: johnny word: blackjak' /dev/ttyS1 115200 modem

Alla gia merikous an8rwpoys, poy o ISP jekina ena kelyfos kai den ekkinei aytomata to PPP, ayto mporei na einai problhma. Eytyxws, to chat mporei to antimetwpisei kai ayto. Apla pros8este mia entolh akoma sto chat script. Gia paradeigma, parakatw aytos o tupos, o johnny, xrhsimopoiei enan ISP o opoios ton bgazei se ena kelyfos (shell), perimenontas apo ayton na plhktrologhsei ppp gia na apokthsei mia sundesh ppp. H protroph/endeijh (prompt) toy kelufoys teleiwnei me ena $. pppd connect 'chat "" "ATZ" "" ATDT555-1800 CONNECT "" ogin: johnny word: blackjak $ ppp' /dev/ttyS1 115200 modem

An einai panw apo mia lejh, sigoyreyteite, oti einai se eisagwgika. Elpizw oti mporeite na deite thn genikeysh twn parapanw, kai oti mporeite na dhmioyrghsete to diko sas script poy na tairiazei sth dikh sas sundesh. Apla tropopoihste eite to prwto johnny eite to deutero johnny script gia na tairiazei me to diko sas gousto, port, server, klp. kai swste to arxeio.

Twra poy ftiajate to arxeio sas, bebaiw8eite oti mono o root mporei na to ektelesei, na diabasei h na gracei se ayto. Ayto einai polu shmantiko. Epishs, sigoyreyteite oti kaneis de mporei na diabasei ta logfiles sas, an apofasisete na afhsete to -v, ka8ws to password fainete se cleartext sta logs (Proswpika den blepw to logo na yparxei to -v, ean den katalabainete ti lew, afhste to -v ejw).

2.2 Diey8unseis IP, Domain Names kai Ypodiktya (Subnets)

Gia toys perissoteroys poy xrhsimopoioun ta parapanw, mia metablhth dieu8ynsh IP den 8a toys enoxlouse. Aytoi oi an8rwpoi einai basika aploi xrhstes, poy exoyn aplous logariasmous mesw thlefwnoy (dialup accounts), kai texnika den lambanontai yp'ocin. Ean anhkete se ayth thn kathgoria, mporeite na mh diabasete ayth thn enothta, 8a perasw sta shmantika pragmata poy prepei na kanete gia na ry8misete to susthma sas katallhla. Oi arxarioi prosperaste ayth thn enothta poy exei na kanei me monimh dieu8ynsh IP, Domain Names kai ypodiktya, kai phgainete na diabaste to teleytaio kommati ayths ths enothtas.

H apokthsh mias monimhs dieu8ynshs IP mporei na mhn stoixizei ston ISP, an exete amfibolia peri aytou, rwthste ton. Egw proswpika, 8a plhrwna gia mia monimh dieu8ynsh IP. Soy epitrepei na stelneis e-mail xrhsimopoiwntas monadikh dieu8ynsh IP h domain, klp. Ean 8elete na parete monimh dieu8ynsh IP, steilte ena e-mail sto root@yourisp.com, kai rwthste eygenika ean mporei na kanonisei wste na sas do8ei kapoia monimh dieu8ynsh IP.

Otan parete thn monimh dieu8ynsh IP, koitajte ston katalogo /etc gia na breite poia einai h palia sas dieu8ynsh IP. Egw eprepe na allajw arxeia ston katalogo sendmail kai sto arxeio /etc/hosts. Yparxoyn kai merika alla arxeia-kleidia poy 8a breite mono me thn entolh grep. Anoijte to arxeio /etc/hosts me enan dior8wth kai pros8este th nea dieu8ynsh IP me th stantar morfh. Epanekkinhste ton ypologisth sas, kai 8a prepei na eiste etoimoi.

Mporei na xreiastei na allajete to chat script wste na enarmonizetai me tis nees sas ry8miseis. An anagkastika mpainete se PPP me to poy jekinate thn sundesh sas, 8a xreiastei na milhsete ston diaxeiristh diktuoy toy ISP gia na bebaiw8eite oti to PPP susthma anagnwrizei oti exete monimh dieu8ynsh IP kai sas dinei ayth anti mias opoiasdhpote allhs. An bre8eite sthn protroph entolhs (prompt) enos kelufoys, kai xreiazetai na gracete ppp h kati allo prokeimenoy na jekinhsete thn sundesh sas, anti na plhktrologhsete ayto allajte to  /ppp-connect script wste na to stelnei anti na stelnei apla ppp h otidhpote allo, me to poy 8a blepei $ h opoiodhpote einai h endeijh toy kelufoys.

/usr/sbin/pppd :H_Dieu8ynsh_IP_Sas

Antikatasthste thn dieu8ynsh IP sas me thn dieu8ynsh IP poy sas edwse o ISP sas. Sigoyreyteite oti thn perikleiete se " " otan thn bazete sto chat script sas. An ayto de doyleuei, symboyleyteite ton ISP opoy anaferetai o PPP daimonas sas kai rwthste ton ti entolh prepei na dwsete. Mporeite apla na prospa8hsete afhnontas to opws einai kai na deite an o server 8a sas anagnwrisei kai 8a sas dwsei thn swsth dieu8ynsh.

To epomeno poy prepei na kanete einai na parete ena domain name. Gnwrizw oti sthn Aystralia ta, .asn.au kai .org.au einai dwrean. Stis Hnwmenes Politeies, mporeite na parete ena .us domain dwrean, alla ayta synh8ws einai megala. Ean eiste sthn Aystralia, prepei na pate sto http://www.aunic.net/ gia na kataxwrhsete ta domains sas. Stis Hnwmenes Politeies, einai to http://www.internic.net/ .

Gia na kataxwrhsete domains xreiazetai na mporeite na parexete yphresies DNS, kai tetoia pragmata. An o ISP den mporei na ta parexei, jexaste to .asn.au h opoiodhpote allo domain, kai parte ena Monolith Internet Domain.

H Monolith prosferei dwrean domains se opoiondhpote se olo ton kosmo. Ola ginontai xwris an8rwpinh parembash, mesa apo formes web me kapoio browser. To domain sas erxetai sth morfh Your_Choice.ml.org. H Monolith 8a filojenei to DNS topika gia sas. Ean 8elete na stelnete kai na lambanete mail apo ayto to domain, zhthste apo ton ISP na ginei mail exchanger gia sas.

Phgainete sto http://www.ml.org/ kai symplhrwste mia aithsh, eisagete to NIC mazi me to username kai to password, kai ftiajte ena FREED domain. 8a xreiastei na eisagete thn dikh sas dieu8ynsh IP, gi' ayto na eiste etoimoi. To domain sas 8a einai sto DNS se mia-dyo meres.

Twra, 8a proxwrhsoyme sthn enothta gia toys arxarioys h gi'aytous poy den mporoun na paroyn monimh dieu8ynsh IP h domain name. To mono poy prepei na kanete einai na kanete edit to arxeio /etc/hosts san root, peite to site sas kapws poy na mhn yparxei hdh, dwste toy gia dieu8ynsh IP 10.10.10.10 h kati paromoio kai epanekkinhste ton ypologisth sas.

Exete molis ry8misei to susthma sas me pppd kai chat se molis deka lepta. Twra as proxwrhsoyme sthn epomenh enothta, poy exei na kanei me thn hlektronikh allhlografia (Electronic Mail).


Next Previous Contents