Библиотека сайта rus-linux.net
Next: A Sample Script Up: Serial Line IP Previous: SLIP Operation
Now, that was rather simple. Nevertheless, you might want to automate the above steps so that you only have to invoke a simple command that performs all steps shown above. This is what dip is for. The current release as of this writing is version-3.3.7. It has been patched very heavily by a number of people, so that you can't speak of the dip program anymore. These different strains of development will hopefully be merged in a future release.
dip provides an interpreter for a simple scripting language that can handle the modem for you, convert the line to SLIP mode, and configure the interfaces. This is rather primitive and restrictive, but sufficient for most cases. A new release of dip may feature a more versatile language one day.
To be able to configure the SLIP interface, dip requires root privilege. It would now be tempting to make dip setuid to root, so that all users can dial up some SLIP server without having to give them root access. This is very dangerous, because setting up bogus interfaces and default routes with dip may disrupt routing on your network badly. Even worse, this will give your users the power to connect to any SLIP server, and launch dangerous attacks on your network. So if you want to allow your users to fire up a SLIP connection, write small wrapper programs for each prospective SLIP server, and have these wrappers invoke dip with the specific script that establishes the connection. These programs can then safely be made setuid root.
- A Sample Script
- A dip Reference
Thu Mar 7 23:22:06 EST 1996