old-www/HOWTO/PPP-HOWTO/dynamic-server.html

267 lines
6.0 KiB
HTML

<HTML
><HEAD
><TITLE
>Using Internet services with Dynamic IP numbers</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.52"><LINK
REL="HOME"
TITLE="Linux PPP HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Why can't people finger, WWW, gopher, talk, etc. to my machine?"
HREF="x1357.html"><LINK
REL="NEXT"
TITLE="Setting Up a local Name server"
HREF="x1386.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
><A
HREF="http://www.linuxports.com/howto/ppp"
TARGET="_top"
>Linux PPP HOWTO</A
></TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1357.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1386.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="CHAPTER"
><H1
><A
NAME="DYNAMIC-SERVER"
>Chapter 23. Using Internet services with Dynamic IP numbers</A
></H1
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
>23.1. <A
HREF="dynamic-server.html#AEN1368"
>Setting up email</A
></DT
><DT
>23.2. <A
HREF="x1386.html"
>Setting Up a local Name server</A
></DT
></DL
></DIV
><P
>If you are using dynamic IP numbers (and many service providers will only
give you a dynamic IP number unless you pay significantly more for your
connection), then you have to recognize the limitations this imposes.</P
><P
>First of all, outbound service requests will work just fine. That is,
you can send email using sendmail (provided you have correctly set up
sendmail), ftp files from remote sites, finger users on other machines,
browse the web etc.</P
><P
>In particular, you can answer email that you have brought down to your
machine whilst you are off line. Mail will simply sit in your mail queue
until you dial back into your ISP.</P
><P
>However, your machine is NOT connected to the Internet 24 hours a day,
nor does it have the same IP number every time it is connected. So it is
impossible for you to receive email directed to your machine, and very
difficult to set up a web or ftp server that your friends can access! As
far as the Internet is concerned your machine does not exist as a
unique, permanently contactable machine as it does not have a unique IP
number (remember - other machines will be using the IP number when they
are allocated it on dial-in).</P
><P
>If you set up a WWW, (or any other server), it is totally unknown by any
user on the Internet UNLESS they know that your machine is connected AND
its actual (current) IP number. There are a number of ways they can get
this info, ranging from you ringing them, sending them email to tell
them or cunning use of ".plan" files on a shell account at your service
provider (assuming that your provider allows shell and finger access).</P
><P
>Now, for most users, this is not a problem - all that most people want
is to send and receive email (using your account on your service
provider) and make outbound connections to WWW, ftp and other servers on
the Internet. If you MUST have inbound connections to your server, you
should really get a static IP number. Alternatively you can explore the
methods hinted at above...</P
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN1368"
>23.1. Setting up email</A
></H1
><P
>Even for dynamic IP numbers, you can certainly configure sendmail on your
machine to send out any email that you compose locally. Configuration of
sendmail can be obscure and difficult - so this document does not
attempt to tell you how to do this. However, you should probably
configure sendmail so that your Internet service provider is designated
as your "smart relay" host (the <TT
CLASS="LITERAL"
>sendmail.cf</TT
> <I
CLASS="EMPHASIS"
>DS</I
> option). (For more
sendmail configuration info, see the sendmail documents - and look at the
m4 configurations that come with sendmail. There is almost certain to be
one there that will meet your needs).</P
><P
>There are also excellent books on Sendmail (notably the 'bible' from
O'Reilly and Associates), but these are almost certainly overkill for
most users!</P
><P
>Once you have sendmail configured, you will probably want to have
sendmail dispatch any messages that have been sitting in the outbound
mail queue as soon as the PPP connection comes up. To do this, add the
command</P
><P
>&#13;<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="SCREEN"
>sendmail -q &#38;</PRE
></TD
></TR
></TABLE
>&#13;</P
><P
>to your /etc/ppp/ip-up script (see below).</P
><P
>Inbound email is a problem for dynamic IP numbers. The way to handle
this is to:-
<P
></P
><UL
><LI
><P
>configure your mail user agent so that all mail is sent out with a
"reply to" header giving your email address at your Internet Service
provider.
If you can, you should also set your FROM address to be your email
address at your ISP as well.&#13;</P
></LI
><LI
><P
>use the popclient, fetchmail programs to retrieve your email from your
service provider. Alternatively, if your ISP is using IMAP, use an IMAP
enabled mail user agent, (such as pine).</P
></LI
></UL
>&#13;</P
><P
>You can automate this process at dial up time by putting the necessary
commands in the <TT
CLASS="LITERAL"
>/etc/ppp/ip-up</TT
> script (see below).</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1357.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1386.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Why can't people finger, WWW, gopher, talk, etc. to my machine?</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Setting Up a local Name server</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>