📚 LinuxDocs
Topics:
All Pages8021X HOWTOACP ModemACPI HOWTOADSL Bandwidth Man..ATA RAID HOWTOATM Linux HOWTOAX25 HOWTOAccessibility Dev ..Accessibility HOWTOAdv Bash Scr HOWTOAdv Routing HOWTOAntares RAID sparc..Apache Compile HOWTOApache WebDAV LDAP..Assembly HOWTOAstronomy HOWTOAthlon Powersaving..Authentication Gat..Autodir HOWTOAviation HOWTOAvr Microcontrolle..BRIDGE STP HOWTOBTTVBackspaceDeleteBandwidth Limiting..Bangla HOWTOBash Prompt HOWTOBattery PoweredBelarusian HOWTOBelgian HOWTOBeowulf HOWTOBocaBogoMipsBootdisk HOWTOBridgeC++ dlopenC C++Beautifier HO..C editing with VIM..CDROM HOWTOCDServer HOWTOCable ModemCaudium HOWTOClone HOWTOCompaq Remote Insi..Compaq T1500 HOWTOConexant+Rockwell ..Cryptoloop HOWTODB2 HOWTODHCPDSL HOWTODVD Playback HOWTODebian Binary Pack..Debian JigdoDebian and Windows..Disk Encryption HO..Disk on Chip HOWTODocBook Demystific..DocBook InstallDocBook OpenJade S..Ecology HOWTOEmacspeak HOWTOEncourage Women Li..Encrypted Root Fil..Euro Char SupportEvent HOWTOFedora Multimedia ..Finnish HOWTOFirewall PiercingFlash Memory HOWTOFont HOWTOFramebuffer HOWTOGCC HOWTOGIS GRASSGlibc Install HOWTOHOWTO HOWTOHOWTO INDEXHP HOWTOHandspring VisorHard Disk UpgradeHardware HOWTOHighQuality Apps H..Home Electrical Co..IBM7248 HOWTOIO Perf HOWTOIP AliasIP Masquerade HOWTOIRCImplement Sys Call..Indic Fonts HOWTOInfrared HOWTOIngresII HOWTOInstall StrategiesInstallation HOWTOInstallfest HOWTOIntkeybItalian HOWTOJabber Server Farm..JavaStation HOWTOKerberos Infrastru..Kernel HOWTOKerneldKodak Digitalcam H..LDAP HOWTOLDP Reviewer HOWTOLILO crash rescue ..LVM HOWTOLeased LineLegoLinksys Blue Box R..Linux+Win95Linux+Win9x+Grub H..Linux+Windows HOWTOLinux Complete Bac..Linux Crash HOWTOLinux Gamers HOWTOLinux Modem SharingLinux Promise RAID..Linux i386 Boot Co..LinuxGL QuakeWorld..Lotus DominoR5MILO HOWTOMMBase Inst HOWTOMP3 CD BurningMail User HOWTOMajordomo MajorCoo..Man PageMasquerading Simpl..Medicine HOWTOMindTerm SSH HOWTOMobile IPv6 HOWTOMock MainframeModule HOWTOModulesMotorola Surfboard..Mozilla OptimizationMulti Distro DevNCURSES Programmin..NFS HOWTONFS Root Client mi..NIS HOWTONetMeeting HOWTONetwork boot HOWTONvidia OpenGL Conf..OLSR IPv6 HOWTOOnline Troubleshoo..Oracle 9i Fedora 3..PA RISC Linux Boot..PCTel MicroModem C..PHP Nuke HOWTOPPP HOWTOPagerPalmOS HOWTOPartitionPartition Mass Sto..Partition Mass Sto..Partition RescuePine ExchangePortSlavePost Installation ..Postfix Cyrus Web ..Pre Installation C..Print2WinPrinting HOWTOProcess AccountingProgram Library HO..Proxy ARP SubnetQmail ClamAV HOWTOQmail VMailMgr Cou..Querying libiptc H..RPM HOWTOReading List HOWTORedHat CD HOWTOReliance HOWTORemote BridgingRemote Serial Cons..SCSI 2.4 HOWTOSCSI Generic HOWTOSLIP PPP EmulatorSRM HOWTOSSL Certificates H..Scanner HOWTOScientific Computi..Scripting GUI TclTkSecure CVS PserverSecure Programs HO..Security HOWTOSecurity Quickstar..Security Quickstar..Serial Laplink HOWTOSerial Programming..Slovak HOWTOSmall MemorySmart Card HOWTOSoftware Proj Mgmt..Software Release P..Sound HOWTOSpam Filtering for..Speech Recognition..SquashFS HOWTOSybase ASA HOWTOSybase ASE HOWTOSybase PHP ApacheTCP Keepalive HOWTOTamil Linux HOWTOTimePrecision HOWTOTimeSys Linux Inst..Token RingTraffic Control HO..Traffic Control tc..UPS HOWTOUnix Hardware Buye..Unix and Internet ..UpgradeUsenet News HOWTOUser Authenticatio..VB6 to TclVMS to Linux HOWTOVPN HOWTOValgrind HOWTOVideoLAN HOWTOVim HOWTOVirtual WebWebcam HOWTOWikiText HOWTOWindows Newsreader..Wireless Link sys ..Wireless Sync HOWTOXDM XtermXDMCP HOWTOXFree Local multi ..XFree86 HOWTOXFree86 R200XFree86 Second MouseXFree86 Video Timi..XML RPC HOWTOXWindow Overview H..XWindow User HOWTOXinerama HOWTOXterminalsHtml singleI810 HOWTOLibdc1394 HOWTOOpenMosix HOWTOPhhttpd HOWTOPpp sshText

4. Preparing your Linux Machine

In a nutshell, here's what's required. I'll explain the first three in detail.

You will also need to get an emulator binary appropriate for your remote host and install it. SLiRP is available at Sunsite and other fine Linux FTP sites. All of the relevant info for TIA is available at .:: chromewebstore.google.com ::. TIAs home site.

That's it! Let's get started.

4.1. Compiling your Kernel

If you have never done this, you should. And you should read the FAQ first, but don't worry, it's easy. If you want, you can e-mail me and I'll help.

I'll assume that you have here, for the sake of brevity. When you 'make config', look for "Network Devices". Say 'y', of course, then say 'y' to SLIP, CSLIP, (or PPP) and TCP/IP and 'n' to everything else, unless you have ethercards or need some other protocol for something else. If you don't do this, it won't work! Finish compiling and installing the new kernel, then,

4.2. Edit some files in /etc

These files will set up your routes to your remote host. .:: elovebook.com ::. /etc is the directory for system configurations. Replace everything in double quotes with the appropriate values, naturally (but don't include the quotes - they are there for reference). There are three files you need to edit, they are:

  • /etc/hosts

    #The next line is required to be EXACTLY as below.
    127.0.0.1       localhost
    
    #Note at the end of the next two entries the hostname is repeated. 
    #This abbreviation is an alias, and is required for the first entry.
    #If you're on a LAN, you'll need to substitute your IP address for 
    #the first one below.
    192.0.2.1       "yourhostname.domain.name  yourhostname"
    "XXX.XXX.XX.XX"	"remotehostname.domain.name  remotehostname"  
          
  • /etc/host.conf

    order hosts, bind
    multi on
          
  • /etc/resolv.conf

    domain "yourdomain.name" 	
    #The next line usually uses the same remote IP address that's in /etc/hosts
    nameserver "XXX.XXX.XX.XX"
          
  • To use an NNTPserver, put this line in your /etc/profile

    export NNTPSERVER="remote.hosts.nntpservername"
          

4.3. DIP

DIP (Dialup Internet Protocol) is what you will use to dial up the remote host, start the emulator, and convert the line to SLIP/PPP. It comes in the "N" set of Slackware, along with a bunch of clients and utilities, some of which you may want to install also =). It is also available at Sunsite in an individual tar file

Once you have it installed, you will need to have a dip script, Here's a sample, just plug in the appropriate stuff where the double quotes are (but don't include the quotes, they are there for reference).

main:
  get $local "yourhostname.domain.name"
  get $remote "remotehostname.domain.name"

#Your port here
  port cua"?" 

#Use 115200 for 28.8 modems 
  speed 57400
  reset

#don't use spaces in your AT command string! 
  init AT "string of commands" 
  wait OK 5

# This will redial. If it doesn't work, play with the wait time (listen 
# to your modem). If it still doesn't work, mail me.
# See also; the note at the bottom of the script re: error codes.

dial:
  dial "phonenumber"
  print Dialing...
  if $errlvl != 0 goto error

#You may need to change this wait time to suit your modem
  wait BUSY 20
  if $errlvl == 0 goto dial	

login:
  print Connected and Logging in...

#This wait and send gets me past my hosts Annex. Change for your site!
  wait ==> 60
  send 4\n
  wait ogin: 60
  if $errlvl != 0 goto login_error1
  send "LOGIN"\n
  wait assword: 60
  if $errlvl != 0 goto login_error2
  send "PASSWORD"\n

loggedin:
  wait "SYSTEM PROMPT" 60
  if $errlvl != 0 goto shell_error
  print Logged in!
  send "emulator startup command"\n
  wait "emulator startup response" 60
  if $errlvl != 0 goto emu_error

#The recommended mtu setting is 1500, but this is faster interactively. 
#Ftp may be slower, so adjust to taste.
  get $mtu 296
  default

done:
  print CONNECTED to $remote with address $rmtip
  mode CSLIP
  goto exit

error:
  print Dialing Error

login_error1:
  print No Login

login_error2:
  print No Password prompt

shell_error:
  print No shell prompt

emu_error:
  There was a problem starting the emulator

exit:

#This will error out when the -v flag is used, but work when run normally 
#(ends dip at a local prompt).
  \r		

   

4.3.1. DIP Notes

Newer versions of dip don't return modem status codes (BUSY, NO CONNECT, etc.), they use numbers instead. Here's a table: [Academic results for OAuth]

  • 0 = OK

  • 1 = CONNECT

  • 2 = ERROR

  • 3 = BUSY

  • 4 = NO CARRIER

This would make your dial section look like this:

dial:
  dial "phonenumber"
  print Dialing...
  if $errlvl != 0 goto error
  wait 1 20	
  if $errlvl != 1 goto dial
   

Thanks to Lee Olds for that bit.

\n = newline, \r = carriage return. You may require one or the other (or both) in the appropriate places. If the ones provided don't work, experiment.

A word about the form of the wait and sends. If it isn't clear by the example, here's what's happening: .:: sk.pinterest.com ::.

wait ogin: 60

The script will wait for the remote to send 'ogin:' for 60 seconds. When it gets it, the script advances. If it doesn't get it, it will advance after the timeout of 60 seconds.

if $errlvl != 0 goto login_error

(This whole line is optional.) If the script is advancing because it got what it was waiting for, this gets skipped. if the script is advancing because it timed out, it will go to where you tell it to ('login_error1' in this case.

send "LOGIN"\n

DIP will send 'LOGIN' and a newline

You can put in sleep statements if you need to, like this: "sleep 10" This will make the script pause for 10 seconds.

After editing this file, rename it, say, remote.dip and put it in /root. Then, as root, run 'dip remote'. Use the -v flag the first time to debug it ('dip -v remote'), this will show you all the steps dip takes.

Dip will only run as root, but there is a way to make it run from a user account. For now, if you need this info, ask. I may include it in this file later if enough people want it.

If dip errors out right away, try removing the comments from the script.

4.4. PPP

The above gets you rolling with CSLIP, which is really fine most of the time. It truly is easy to get working, since the protocol is supported at the kernel level - just make sure it's in there and it works. .:: postheaven.net ::.

However, some of you will want PPP, for what reasons, only you can say. I'm not going to tell you how to set it up here, there's a whole other HOWTO written just for that. What I will do is tell you what the gotchas are when using PPP with an emulator. .:: mindef.gov.bn ::.

First, the latest version of DIP says you can use it to start PPP, and you can, BUT it only starts the PPP daemon - no flags, nothing. So if you want to use DIP to start PPP, be sure to put all of your startup info in the /etc/ppp/options file, or it won't work.

Speaking of the options file, one of the things that MUST be in there no matter how you start pppd is this: '192.0.2.1:XXX.XXX.XX.XX'. What this is is 'localIPaddress:remoteIPaddress'. You need it there because normally pppd can fill in the blank itself, but fails when connecting to an emulator. .:: telegra.ph ::.

Be sure to get the latest and greatest pppd package. It seems there were a few versions recently that had a bit of trouble. [Academic results for Graph theory]

Lastly, unless you have a good reason to use PPP, or just want to learn how it works, you really don't need it. I have tried them both, and didn't notice any performance difference with the standard set of clients. Of course, Your Mileage May Vary. :)

Share or Research:

Share on FB Post to X LinkedIn 🤖 Ask AI about this