SLIRP(1)
πΈ SLIRP π
okay bestie, welcome to the General Commands Manual entry for slirp β she's a whole vibe and she's about to turn your boring little shell account into something iconic β¨
β¨ NAME β¨
slirp β a TCP/IP emulator π¦
π SYNOPSIS π
slirp [options|commands]
slirp help
slirp "help cmd"
π DESCRIPTION π
Slirp is a TCP/IP emulator, and what she does is take your regular ordinary shell account and glow it up into a (C)SLIP/PPP account. no cap. That means you β a humble shell user β get to run all the funky Internet applications. Like Netscape. Like Mosaic. Like CUSeeMe. Like, the whole squad. ππ₯
Slirp is copyright (c) 1995 Danny Gasparovski. All rights reserved. Peep the COPYRIGHT section for the details, bestie.
This manpage is organized like this, okay? First, basic usage gets described very briefly. Then we get into the details of configuration files, commands, and command-line options. After that come several sections discussing technical issues (special addresses, port redirection, baudrate setting), and then answers to frequently-asked questions and common problems. Contact information, acknowledgements and the copyright notice are all at the end. π«Ά
Please read this manpage thoroughly before reporting problems! fr fr. read it. all of it. π
πΈ USAGE πΈ
To run Slirp, you literally just type:
slirp
(or whatever the full path to Slirp is). That's it. That's the whole thing. Now you activate your SLIP/PPP software, and you start your applications. slay. β¨
All you have to remember is this one (1) thing: Once you run Slirp, your shell account now looks exactly like a SLIP/PPP account (with some limitations of course, let's be real). So any documentation you have telling you how to connect to a SLIP/PPP account? Completely valid for Slirp as well. she's that girl. π
To quit Slirp you simply kill your SLIP/PPP software and type five 0's (zeroes), with a 1 second gap between each zero. Slirp will then exit and you will be back at your shell prompt. bye bestie π
You can also "disconnect" Slirp by typing five 1's (one's), with a 1 second gap between each. This will disconnect Slirp from your shell's terminal and put Slirp in the background. Later, you can type
slirp -l 0
to "reconnect" Slirp again. it's giving hide and seek π«£
π Quick note for PDA users π
If you set SLIRP_TTY to the tty connected to your PDA (Palm, POSE emulator, etc.), Slirp will use that tty for communication. You can use PPP without full masquerading, although you will be subject to the standard Slirp constraints. You may need to experiment to find the correct baud rate. Start with 19200 for Palms. If Slirp was not compiled with DO_CFSETSPEED, you'll need to set the speed on the tty manually. Use an appropriate variant of stty 19200 < /dev/pilot after starting slirp. π
π¦ CONFIGURING SLIRP π¦
Slirp can be configured in 3 different ways: the command line, the configuration files, and "on-the-fly" configuration by telnet-ing to 10.0.2.0 and entering the commands there (see "SPECIAL ADDRESSES," below). three whole options. she's versatile like that. π
The configuration file is located in your home directory (~) and is called .slirprc, hence the path to your configuration file is ~/.slirprc. iconic name honestly.
Options which can appear in a configuration file can also be given on the command line. E.g., if your .slirprc file looks like the following:
redir 5022 21
redir X
you can achieve the same thing by running Slirp as:
slirp "redir 5022 21" "redir X"
(Notice the quotes, they ARE significant). π do not forget the quotes.
The reverse is also true. E.g., if you run slirp as:
slirp -P -b 14400
you can create your .slirprc file too look like the following:
-P
-b 14400
(Notice that only ONE command per line is allowed in configuration files). one. singular. do not be greedy bestie.
The 2 types of options can also be mixed. For example:
In .slirprc:
-P
-b 14400
redir 5022 21
Command line:
slirp -P -b 14400 "redir 5022 21"
Note that on the command line, any command/option that does not begin with a - or +, and has spaces in it, MUST be enclosed in quotes. E.g., the following are all legal:
slirp -P "redir udp 5022 25" -vj -b 14400
slirp "ppp" "baudrate 14400"
slirp ppp "baudrate 14400"
(Notice that even though "ppp" does not begin with a - or +, it does not need to be enclosed in quotes because it has no spaces in it) π§
The following are NOT legal:
slirp baudrate 14400
slirp "-b 14400"
(Because -b starts with a - you must NOT enclose it in quotes.) Easy, eh? πβ¨
Note: Whenever Slirp expects an IP address as an argument (E.g., in the commandredir) and the IP address argument is not given, then the default used is different depending on where the command appeared; if it was in~/.slirprcthen the default is10.0.2.15; if it was in a telnet10.0.2.0, then the IP address used is the IP address from where the telnet10.0.2.0connection was made. For example, if you have a LAN at home and telnet to10.0.2.0from one of the hosts and issue aredircommand, Slirp will use the IP address of the host from where you made the telnet10.0.2.0connection. Also, if you use an IP address on your PC other than10.0.2.15, you should include it as an argument whenever Slirp expects it, for example with theredircommand:
redir 5555 your.ip.address:5555
A few notes on configuration:
- You should have
"ppp"or-Pbefore any PPP options (because when Slirp parses-Porppp, it will initialize all related fields, hence clearing anything that was parsed before it). order matters bestie!! π - Upon startup, the configuration is done in this order:
~/.slirprc-N(if using Load-balancing or Link-resumption)~/.slirprc- Command-line options
This is important because, for example, if you have "initiate-options" (a PPP option) in ~/.slirprc-0, and you run slirp with -P, "initiate-options" will not be valid, because -P will clear the fact that you want options initiated by Slirp (remember, -P should always come before any PPP options). β
π COMMANDS AND OPTIONS π
okay so slirp ships with its own lil online-help bestie π«Ά. Wanna see every command slirp will accept? Just give it the help command. Two ways to do that:
- straight from your shell prompt, like:
slirp "help"
- or, once slirp is up and running, telnet over to
10.0.2.0and type:
help
Wanna know what one specific command does? Just type help COMMAND and it'll hand you the short version β¨. E.g.:
slirp "help baudrate"
from the command line, or:
help baudrate
in a telnet to 10.0.2.0.
okay quick key for everything below, because iykyk π
: stuff inside square brackets is optional. Usable tells you where a thing can go, i.e. command-line/config-file, telnet, or anywhere (which means it can appear in either the command-line/config-file or be given via telnet, no cap). Command-line gives you the command-line equivalent, where applicable.
redir X [start N] [ADDR][:DISPLAY[.SCREEN]]
Redirect a port so it can be used with the X Window System. π
Usable: anywhere
Command-line: -X
Options:
start Nβ tells slirp to start looking for free ports starting from N. eg: if N = 2, slirp will try to grab port 6002, then 6003, etc. this is useful for sites which sometimes run their own X server and you don't want to nab their port 6000, which they would naturally expect.ADDRβ our home ip address, or the address where the X server is (if you have a LAN at home to connect more than one machine to the net) (default10.0.2.15when in~/.slirprc, the source IP address when in command-line).DISPLAYβ which display to redirect to (default:0).SCREENβ which screen to redirect to (default.0).
Example: redir X 10.0.2.15:0.0
Note: this will print the command you need to enter into each shell from where you launch your X apps. π«Ά
See also: show X.
show X
Shows you the command you need to give your shell for any X port that's already been redirected (in case you forget, which β same honestly π).
Usable: telnet
Example: show X
Note: this is useful if you forget the command to give to your shell for X redirection.
See also: redir X, log start.
redir [once|time] [udp|tcp] PORT [to] [ADDRESS:]LPORT
Redirect a host port to a local port using whichever protocol you picked out.
Usable: anywhere
Options:
onceβ only allow one redirection [TCPonly]timeβ allow redirection to time out [UDPonly]udpβ redirect a UDP porttcpβ redirect a TCP port [default]PORTβ port to use on host systemADDRESSβ address of your home machine [default10.0.2.15]LPORTβ port to redirect host port to on local system
Example: redir tcp 5021 to 21
This lets users ftp to your local machine using your host's port 21. (ftp your.hosts.name 5021). slay π
Note: if this command is in your.slirprcfile and no address is specified, it will assume that your local IP address is10.0.2.15. If you enter the command from the slirp control telnet IP it will use the IP address you are accessing with.
baudrate N
This one controls the allocation of time to communications across your serial link. Higher values generally use more of the available bandwidth to your modem. And listen β this is only an internal control value and does not change the physical settings for the host port or modem. fr fr.
Usable: anywhere
Command-line: -b
Example: baudrate 14400
Note: higher numbers generally allow better transfer rates for ftp sessions, but interactive sessions could become less responsive. the optimum value is JUST when ftp sessions reach maximum throughput, but this can be hard to find (especially on compressing modems) so you should choose the maximum throughput you would expect from your modem.
special|control|host addr ADDRESS
Sets ip address aliases and others for slirp. β¨
Usable: anywhere
Options:
special addressβ set the network ip alias for slirpcontrol addressβ only allow access to slirp control address fromADDRESS.host addressβ tell slirp the IP address of the host it's running on. Use this only if slirp can't properly find the host's IP address.
Example: special address 10.0.3.0
Note: theADDRESSfor special must end in 0 (zero) and other addresses are classed from this. The default special address is10.0.2.0giving the following defined IP's:
10.0.2.0 slirp control telnet IP
10.0.2.1 slirp exec IP
10.0.2.2 slirp host alias
10.0.2.x add [pty]exec optional address
add [pty]exec PROGRAM:[ADDRESS:]PORT
Sets a program to execute on the host when your local machine attempts to connect to ADDRESS at port PORT.
Usable: anywhere
Options:
execβ establish binary connection to program in the style of inetd.ptyexecβ establish telnet connection to program using telnetd helper application under a pseudo-terminal.PROGRAMβ program to execADDRESSβ optional addressPORTβ port
Example: add ptyexec csh:55
A telnet connection to the slirp exec IP (default 10.0.2.1) will start and connect you directly to the csh program on the host. (telnet 10.0.2.1 55). πΈ
Example: add exec nntpd:10.0.2.3:119
A program that attempts to open port 119 at address 10.0.2.3 will be connected to the nntpd program.
Note: the use of the ptyexec form requires theslirp.telnetdhelper application be available on your path. Also note thatADDRESSmust be of the formSPECIAL_ADDRESS.xx(10.0.2.xxby default).
[no]compress
Forces the startup mode for slirp to SLIP or CSLIP. This overrides the default automatic mode determination. π
Example: nocompress
Start in SLIP mode.
Example: compress
Start in CSLIP mode.
Note: the default method of operation generally performs well. You should only have to use this command if you find that your host and local system are failing synchronize the connection type.
mtu N
Controls the size of the IP packets sent across the serial IP link. Valid values are <= 1500.
Example: mtu 1500 β set the mtu to its largest allowable size.
Note: larger values generally improve the performance of graphics web browsers and ftp transfers across the serial link, at the expense of interactive performance. The default value of552seems to be a reasonable compromise for connections at14400baud.
shell PROGRAM
Sets the program to execute on the EXEC IP default telnet port (23).
This is the same as:
add ptyexec PROGRAM:23
Note: by default slirp connects /bin/sh to the exec IP telnet port.
help [COMMAND]
Shows a brief list of available commands, or more information on the named command. π
remove [pty]exec PROGRAM:[ADDRESS/]PORT
Reverses the effect of "add [pty]exec". see "add [pty]exec" for the options etc.
Note: you must enter the options exactly as you entered it in add [pty]exec.
This description is incomplete.
echo [on|off]
Turns echo on or off, depending on how your client behaves. "echo" all by itself will show you whether echo is currently on or off. π
kill N
Kills the session which has a Socket no. of N. To find the Socket no. of a particular session, use the "stats socket" command. See "stats" below.
Note: it is recommended you use"close N"instead, as this merely wipes out the session, whereas"close N"closes it properly, as a good little tcpip-emulator should :)
"kill -1"shouldn't be used, it will kill the first session it finds with-1, which usually is the command-line connection. π
close N
Closes the session which has a Socket no. of N. Same as "kill N", but it closes the session gracefully. See "kill N".
stats [ip|socket|tcp|vj|udp|mbuf|tty|alltty|others?]
Shows statistics on whatever argument you handed it. π
Options:
ipβ show ip statistics.socketβ show statistics on the currently active sockets. Use this to find out which sessions to close/kill, as it will also show the FD of the session.tcpβ show tcp statistics (packets sent, received, etc).udpβ same as tcp but for udp.mbufβ show how many mbufs were allocated, are in use, etc. If the modem is idle, and there are more than 1 mbufs on the used list, it suggests an mbuf leak. π©
[pty]exec PROGRAM
This will execute PROGRAM, and the current command-line session will cease to exist, taken over by the PROGRAM. ie: when the program exits, you will not get the command-line back, the session will (should) close. π
socket [PORT,PASSWORD]
Creates a Unix-domain socket and listen()s for more interfaces to connect. This is also needed for restarting. Give the arguments PORT,PASSWORD if you wish to use Internet-domain sockets instead of UNIX-domain sockets. π¦
log start
Logs all the startup output to the file .slirp_start.
add emu SERVICE[:TYPE_OF_SERVICE] [lport:]fport
Tells slirp to emulate SERVICE when on port lport/fport.
Options:
SERVICEβ can be:ftp,ksh,irc,none.TYPE_OF_SERVICEβ can be:throughput,lowdelay.LPORTβ can be given if that service needs emulation for, say, servers.
Example: add emu ftp 8021
If you wish to ftp to somewhere on port 8021.
Example: add emu ftp 8021:0
If your home ftp server is on port 8021. NOTE: this does not mean if you redirect port 8021 for your ftp daemon, it refers to the the port AT HOME at which ftpd is listening to.
Example: add emu none:lowdelay 8000
If you telnet somewhere on port 8000, and you wish those packets to go on the fastq (ie: so they have a higher priority than, say, ftp packets). This tells slirp that any packets destined for port 8000 will not have any emulation, but it will be set IPTOS_LOWDELAY. π₯
dns DNS_IP
Give this to slirp if you want to use 10.0.2.3 as an alias for DNS, AND slirp guesses wrong for the DNS on startup. β¨
π TECHNICAL TOPICS π
okay bestie the deep lore is incoming π¦
β¨ Special Addresses β¨
ok so here's the tea: every address shaped like 10.0.2.xxx is special to Slirp π (and yes you can change that whole range with the "special addr" command, icon behavior). Anyway, here's what each one actually means, no cap:
10.0.2.0β this is the Slirp"on-line"configuration address π when you telnet to10.0.2.0you can close connections, configure Slirp, redirect ports, etc. β all while Slirp is still running. Literally the multitasking queen. Go read the section"CONFIGURING SLIRP"for the deets on how to use it π10.0.2.1β this is the address Slirp uses to execute programs π¦ like, say you hand Slirp the command"add exec /bin/ls:23"β then when a connection lands on10.0.2.1on port 23, Slirp will run/bin/lsand redirect the output straight into that connection. so with"add exec /bin/ls:23", if you telnet to10.0.2.1(telnet uses port 23, obvi) you get a list of files in the directory Slirp was started in π another example could be"add exec /path/to/nntpd:119"β now you can tell your News reader to use10.0.2.1as the News host and it will actually connect to the running program"nntpd"β¨10.0.2.2β this one is an alias for the remote host π when you connect to10.0.2.2you're actually connecting to the host Slirp is running on. super useful if your shell account can be on different hosts β10.0.2.2will always mean the host Slirp is running on π«Ά10.0.2.3β alias for your DNS πΈ Slirp will try to figure out your DNS address, and all data sent to10.0.2.3gets redirected to your DNS address, so you can tell your TCP/IP software to use10.0.2.3as your DNS. also lowkey a lifesaver if you run Slirp from multiple hosts, because you don't need to change your DNS for each host π10.0.2.15β this is the address Slirp recommends you use on your PC. but bestie, it's merely a suggestion β Slirp does not care what address you use, periodt π
π Port Redirection π
Port redirection is a big deal in TCP/IP emulators, fr fr β it's what lets other people connect to your PC, and it's also what makes certain programs work that normally justβ¦ wouldn't π
π How do I Redirect a Port? π
first things first, you need to internalize this: under Slirp, nobody on the Internet can address your PC directly, because you do NOT have an IP address that anybody else can see π The ONLY way they can contact you is through the remote host (where Slirp is running). that's just the vibe.
so what's that got to do with port redirection? lots β¨ For other people on the Internet to reach your PC, Slirp needs to listen for connections on a specific port on the remote host, then "redirect" that connection so it connects back to your PC. it's giving matchmaker energy ngl π
say you're running an FTP server on your PC and you want others to connect to it, grab files, upload files, etc. what you do is pick a port number β any port number above 1024 (for security reasons, bestie, don't be reckless) β and tell Slirp that any connections on that port are really connections to your FTP server. you do this with the "redir" command π
for this example, let's say you pick 5555 as the port to redirect (this can be ANY number, provided nobody else is using it). you simply give Slirp the command:
redir 5555 21
the second argument, 21, is the port that's used by FTP. you could have also used the command:
redir 5555 ftp
and Slirp will figure out that "ftp" means 21 π§ this command is basically telling Slirp "any connections to this host (where Slirp is running) on port 5555 are really connections to the home PC on port 21 (the port used by the FTP server)". iconic, honestly.
now you simply tell others to connect to the Remote Host (where Slirp is running), which IS visible on the Internet, on port 5555, and they will be connected to your FTP server π
this same technique gets used when a program uses a specific port for communication β for example Kali, an IPX emulator over TCP/IP that lets users run IPX games over the Internet. Kali uses UDP port 2213 for communication, so for others to be able to send a packet to your PC on UDP port 2213 you need to do the following:
redir udp 2213 2213
all packets now destined for the Remote Host on UDP port 2213 will be sent to your PC on port 2213 π₯
π Common Port Redirections π
here's a list of programs that need a port redirection to work. YOUR_PC_ADDRESS refers to the IP address you assigned to your PC. if it's not supplied, 10.0.2.15 is assumed π
- Kali
redir udp 2213 YOUR_PC_ADDRESS:2213
(Note: you MUST also set your PC's IP address to the same IP address as the Remote Host (where Slirp is running)) π
- IPhone
redir udp 22555 YOUR_PC_ADDRESS:22555
- StreamWorks
redir udp 8000 YOUR_PC_ADDRESS:8000
(the 8000 is configurable)
- PowWow
redir tcp 13223 YOUR_PC_ADDRESS:13223
- WebPhone
redir tcp 21845 YOUR_PC_ADDRESS:21845
redir udp 21845 YOUR_PC_ADDRESS:21845
(Note: WebPhone uses BOTH tcp and udp port 21845. In addition, you probably need to set your PC's address to the same IP address as the RemoteHost in order to get full functionality)
Please let me know of other programs which require redirection like the above π«Ά See "GETTING HELP" for details on how to contact me.
β Setting The baudrate Option β
Slirp's "baudrate" option has caused some confusion, so let's clear that up, bestie β this section will explain exactly what it's for and how to use it π
When sending data over the modem to your PC, Slirp needs to know how much data it can send over without "saturating" the link. if Slirp just sent as much data as it possibly could, the Operating System would buffer a LOT of it β 20k is not uncommon π This could severely "lag" any telnet connections if you happen to be FTP-ing a file at the same time. why? because when you type a character, you will not see that character on the screen until the the other end sends you the "echo" β so if there's 20k worth of data buffered, you'll need to wait until 20k of data is received before you see that character on your screen. the way that would ruin my whole day π
to counter this, Slirp uses the "baudrate" option to limit the amount of data it sends over the link, so the Operating System doesn't buffer too much of it. so if you give Slirp a "baudrate" of 14400, Slirp will send data at a rate of 14400 Baud modem (with no compression) β¨
in general, the baud rate at which the connection was made should be the "baudrate" you give to Slirp. so, for example, if you connected at 14400 Baud, you should give Slirp the option "baudrate 14400". however, since most modems today do compression (v.42bis), it is very difficult for Slirp know how much data to send to keep the link "full", yet prevent too much buffering by the Operating system π©
therefore you should choose a "baudrate" appropriate to your needs: if you use telnet a lot while downloading compressed files, you should set your "baudrate" to the same as the CONNECT speed of your modem. Downloading compressed files should not suffer, and telnet sessions will be far more responsive π however, sending text over the modem will not be as fast, because your modem will compress the data and send it faster than Slirp expects. giving a "baudrate" the same as the CONNECT speed will effectively turn off modem compression.
if you do not use telnet very much, you should set your "baudrate" to the maximum theoretical speed your modem can do. for example, if you connect at 14400 and use v.42bis compression, which can compress up to 4x, you should set your "baudrate" to 14400*4 = 57600. this will ensure any compressible data will get compressed, and a maximum throughput will be attained β at the expense of telnet sessions which will be almost unusable if you happen to be downloading files at the same time π
note however that you can change the "baudrate" setting at any time. simply telnet to 10.0.2.0 and enter "baudrate XXX" and Slirp will change the rate at which data is sent. this can be useful, for example, if you're downloading a lot of compressed files, but in the middle of the download you want to read mail. simply change the "baudrate" to the CONNECT speed, and when you're finished, change it back to the maximum theoretical speed. main character multitasking behavior π
also, keep in mind that the "baudrate" is also used for other calculations. for example, if there are many connections, Slirp will try to be fair and send one packet per connection in a round-robin fashion. this makes all connections "smooth" instead of sending a bunch of packets for one connection, then a bunch of packets for another connection, etc. but if the "baudrate" is too high, the is exactly what will happen π¬ Packet priority selection also uses the "baudrate"; i.e., if there are packets queued ready for sending from both an FTP connection and a telnet connection, the telnet packets will be sent first. but again, this will only work if the "baudrate" reflects the amount of data Slirp can send, and generally won't work if you set it to the maximum theoretical connection speed.
so here are my tips πΈ:
- If you download a lot of compressed files and occasionally use telnet, or other
"interactive"programs, set your"baudrate"to your CONNECT speed (because already compressed files won't compress any more with the modem compression, so you're unlikely to get faster download's as a result of modem compression); - If you mainly use telnet, or other
"interactive"programs, and you occasionally download some compressed files, set your"baudrate"to the maximum theoretical speed (because telnet sessions are usually text, which compresses very well, hence screen updates will be faster. Only when downloading compressed files will you experience severe lag); - If you mainly browse the Web (E.g., using Netscape, etc.), then you should set your
"baudrate"to the theoretical maximum speed (because there's lots of text in Web documents which is very compressible, and there's no telnet sessions so lag will not be a problem);
I personally have my baudrate set at 14400, the speed at which my modem connects, even though the modems do v.42bis compression. Compressed file downloads are just as fast, and telnet sessions during FTP downloads are surprisingly responsive. Try it yourself, there's a world of difference β¨π¦
π PROBLEMS, QUESTIONS, AND ANSWERS π
Which programs do not work over Slirp? π€
Okay so the short answer: any program that bind()'s a port, and then tells the other end of the connection where they should connect() to that bound port. Like it's literally doxxing its own port to the far side and expecting the far side to dial back in. Which does not work, bestie, because your machine is not actually on the Internet. π«
Example time. When you "get" a file during an FTP session, the FTP client bind()'s a socket, has a look at which port the socket is bound to, then tells the FTP server the address and port of this socket (with the PORT command). The FTP server then connect()'s to this address/socket pair. Cute concept, iconic protocol, but...
Now, since your machine isn't really on the Internet, this connect() request will not arrive to your host, so it will not work. β¨ nothing β¨ arriving β¨
Slirp emulates this by bind()ing it's own port on the server that is on the Internet, and tells the FTP server about that address/socket pair. When the server connect()'s to it, Slirp will then connect back to your machine. King behavior honestly π
At present, the following programs are emulated:
rlogin
ftp
ksh
irc (for /dcc)
RealAudio
talk/ytalk/ntalk
CUSeeMe
Troubleshooting π οΈ
Symptom:
The connection will "freeze". E.g., while downloading a picture on WWW it will stop halfway and no connections will continue. It's giving π frozen π
Diagnosis:
You probably don't have an 8bit clean link.
Cure:
You should try and find out from your sysadmin which characters need to be "escaped", then tell Slirp about them using the asyncmap and escape commands. Note that you need to use PPP for this to work. (One way to test for 8bit cleanliness is to download a BINARY file with Z-Modem. If the file doesn't make it, you have a "dirty" link).
One thing you might try is run Slirp as:
slirp "asyncmap ffffffff" "escape ff"
(quotes included!) This will tell Slirp to escape the most common "nasty characters. yes the original quote is unbalanced, no I will not be fixing it, it's canon now π
Symptom:
You can connect to hosts using numerical addresses (of the form aa.bb.cc.dd) but you cannot connect to hosts when you use their hostname (E.g.: ftp.cdrom.com). It usually times out with a DNS error. π
Diagnosis:
You probably did not set your DNS address properly.
Cure:
Try setting your DNS address to 10.0.2.3. This should work for most situations. If that fails, go to your shell prompt and type nslookup. This should print the address and hostname of your DNS server. Use the numerical IP address as your DNS. Do NOT use the hostname. seriously. not the hostname. π«
If you still can't find your DNS address, ask your sysadmin for it.
Answers to Frequently Asked Questions (FAQs) π¬
Q1. Can I use Slirp through Telnet or Rlogin?
A1. Yes, usually. But this is highly dependent on your situation.
The reason Slirp usually doesn't work through telnet is because of the ^] character is interpreted by the telnet client, and 0xff interpreted by the server. While you can tell Slirp to escape these characters while using PPP, it may not be possible to get your local PPP software to escape characters greater than ASCII 31. Rlogin also interprets the ~ character, which may interfere with PPP (especially considering ~ is ASCII 0x7e which is used by PPP as the "end of packet" character"). π΅βπ«
If your PPP software is unable to escape these characters, or you're using (C)SLIP (which must have an 8bit clean link), your best bet is to try and make the link 8bit clean. For example, on some systems you can give telnet the -8 flag to make the link 8bit, and -E to stop it from interpreting the ^] character. Similarly for rlogin; -8 to make the link 8bit, -E to stop rlogin from interpreting the ~ character. You should look at the telnet and rlogin manual pages (man telnet and man rlogin respectively) to see if your telnet/rlogin has similar options.
Another possible solution is to use Slirp's ability to work over multiple hosts. See the slirp.doc documentation for more details.
Q2. How do I run an X program on another host and have it display on my PC?
A2. Use the redir X command in ~/.slirprc. This will redirect a port for use with X programs. π
On startup, Slirp should print something like:
X Redir: In sh/bash/zsh/etc. type: DISPLAY=IP.ADDRESS:X.Y; export DISPLAY
X Redir: In csh/tcsh/etc. type: setenv DISPLAY IP.ADDRESS:X.Y
Now, when you telnet to the host you wish to run the X programs from, you should do as Slirp suggest above; type either of the two commands, depending on which shell you are using. You could also run the X program as xprog -display IP.ADDRESS:X.Y as printed above.
If you missed what Slirp displayed on startup, you can telnet to 10.0.2.0 and give Slirp the command show X, and the above will be printed.
Note that you also have to make sure your X server will accept the connection. See the man page for xhost and Xsecurity. Be careful with issuing commands like xhost +, this will allow anyone to connect to your X server and do basically anything they want. like actually anything. do not do this casually. π³
Q3. When I run "talk" or "wintalk", etc. I am able to send requests to other people but they cannot send requests to me. Why?
A3. You won't be able to receive talk requests, period. This is because Slirp never see's the incoming talk request; it is sent directly over the modem, most likely corrupting any incoming packet with it (which will have to be retransmitted). Slirp turns off your messages so the person who tries to talk to you should receive a User is refusing messages error. π«π¬
Q4. I can't telnet to 10.0.2.0, the Slirp control address. What's wrong?
A4. See the answer to this question in slirp.doc and recompile slirp.
Q5. I'm having a few problems with Slirp and want to try and find the problem myself. Does Slirp have any debugging facilities?
A5. Yes. See slirp.doc for compile-time debug options.
Q6. My ISP logs me out if I idle too long. How can I get Slirp to prevent this?
A6. First of all, the idle-logout mechanism is used for a reason: to prevent people from hogging a modem which is not in use. So if you're idle, logout and give others chance to logon. be a good internet citizen bestie π«Ά
Having said that, you can make Slirp use TCP keep-alive timers to regularly probe each TCP connection. To activate this, add:
keepalive
to your ~/.slirprc file. This will make Slirp probe each TCP connection every minute or so. You can change this interval by giving keepalive the number of seconds:
keepalive SECONDS
Note that no probes will be sent if there are no TCP connections. So you need at least one active TCP connection for this to work.
GETTING HELP π
There are several sources of help. First, read the previous sections "Troubleshooting" and "Answers to Frequently Asked Questions (FAQs)".
If that fails, try the Slirp Home Page at:
http://blitzen.canberra.edu.au/slirp
There are lots of neat links there to other pages which have specific configuration information. π
There is also a Newsgroup dedicated to SLIP-emulators called alt.dcom.slip-emulators. You will find lots of discussion about Slirp and other "SLIP-emulators". The FAQ (Frequently Asked Questions) for alt.dcom.slip-emulators is included in the docs directory, I would suggest reading this as well.
If all else fails, send me e-mail to danjo@blitzen.canberra.edu.au with the following information:
- Output of the command
uname -aon the remote system; - Operating System name and version you run on your PC;
- Version of Slirp you are using (IMPORTANT!!!);
- If you managed to get Slirp running, run Slirp as
slirp -Sthen try whatever failed. When you exit Slirp, you should have a file calledslirp_stats. Send me this file; and - Anything else you consider relevant.
PLEASE include all the above information. If you do not, I may simply press "d". I can't guarantee a response, but I will try my best. π
THANKS π
A big "THANK YOU!" goes to the following people for their help in creating Slirp.
Juha Pirkola, Gregory M. Christy, The Regents of the University of California, Carnegie Mellon University, The Australian National University, and RSA Data Security, Inc. whose source code is used throughout Slirp. Slirp would not be without them.
Thanks to all the contributors who helped with bugs, suggestions, code, etc. Read the file ChangeLog to see exactly who helped with what.
A special thanks goes to Chris Metcalf and Juha Pirkola for their contributions (see ChangeLog). They put in extra effort and Slirp wouldn't be the same without their help. Thanks guys! π
Thanks to all the people who sent very kind and encouraging e-mail, it's sincerely appreciated. π₯Ή
Thanks to all the admins and Head Honcho's at UCNet, the University of Canberra Computer Club ("blitzen") who gave me some real-estate on their machine (blitzen.canberra.edu.au) to work with (thanks to Tony Delroy for giving me the account originally). Hey! Why don't you check out their home page at http://blitzen.canberra.edu.au/?
Thanks to Brazil for coffee (and Sepultura! :)
Thanks to the laws of physics, the building blocks of the universe. β¨ iconique β¨
π COPYRIGHT π
Slirp was written by Danny Gasparovski.
Copyright (c) 1995 Danny Gasparovski. All Rights Reserved.
Okay so Slirp is free software β and bestie, "free" here means you don't have to pay for it, and you're free to do <em>whatever</em> you want with it. Danny does not accept donations, monetary or otherwise, for Slirp. Nope, not even a lil tip. Instead, he asks you to pass that potential donation along to your favorite charity. In fact, he encourages <em>everyone</em> who finds Slirp useful to make a small donation to their favorite charity (for example, GreenPeace π±). Not a requirement, just a suggestion from someone who highly values the service they provide. π«Ά
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- All advertising materials mentioning features or use of this software must display the following acknowledgment:
This product includes software developed by Danny Gasparovski.
β οΈ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DANNY GASPAROVSKI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
So basically, this means you can do anything you want with the software, except 1) call it your own, and 2) claim warranty on it. There is <strong>no warranty</strong> for this software. None. Nada. If you lose a million dollars πΈ while using Slirp, that's your loss, not mine. So, USE AT YOUR OWN RISK! π
If these conditions cannot be met due to legal restrictions (E.g. where it is against the law to give out Software without warranty), you must cease using the software and delete all copies you have.
Slirp uses code that is copyrighted by the following people/organizations:
- Juha Pirkola.
- Gregory M. Christy.
- The Regents of the University of California.
- Carnegie Mellon University.
- The Australian National University.
- RSA Data Security, Inc.
Please read the top of each source file for the details on the various copyrights. π
β¨ AUTHOR β¨
Slirp was written by Danny Gasparovski.
Manpage by George Ferguson, ferguson@cs.rochester.edu, based on Slirp 1.0b documentation. π
And that's a wrap, bestie! π This whole page is from <strong>Version 1.0.17</strong>, dated <strong>8 Jan 2006</strong> β the classic SLIRP(1) manual. Slay. Go forth and redirect some ports. π
β¨
π¦ where this page comes from
- debian bookworm: slirp 1:1.0.17-11
- debian trixie: slirp 1:1.0.17-11
- ubuntu jammy: slirp 1:1.0.17-11
- ubuntu noble: slirp 1:1.0.17-11
- ubuntu resolute: slirp 1:1.0.17-12 Β· BSD-3-slirp
- ubuntu stonking: slirp 1:1.0.17-12 Β· BSD-3-slirp
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms