| 1 | <?xml version='1.0' encoding='UTF-8'?> |
1 | <?xml version='1.0' encoding='UTF-8'?> |
| 2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/home-router-howto.xml,v 1.8 2004/08/06 14:46:25 vapier Exp $ --> |
2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/home-router-howto.xml,v 1.9 2004/08/06 18:18:45 vapier Exp $ --> |
| 3 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
3 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
| 4 | |
4 | |
| 5 | <guide link="/doc/en/home-router-howto.xml"> |
5 | <guide link="/doc/en/home-router-howto.xml"> |
| 6 | |
6 | |
| 7 | <title>Home Router Guide</title> |
7 | <title>Home Router Guide</title> |
| … | |
… | |
| 598 | </body> |
598 | </body> |
| 599 | </section> |
599 | </section> |
| 600 | --> |
600 | --> |
| 601 | |
601 | |
| 602 | <section> |
602 | <section> |
|
|
603 | <title>Time Server</title> |
|
|
604 | <body> |
|
|
605 | <p> |
|
|
606 | Keeping your system time correct is essential in maintaing a healthy |
|
|
607 | system. One of the most common ways of accomplishing this is with |
|
|
608 | the Network Time Protocol [NTP] and the ntp package (which provides |
|
|
609 | implementations for both server and client). |
|
|
610 | </p> |
|
|
611 | |
|
|
612 | <p> |
|
|
613 | Many people run ntp clients on their computers. Obviously, the more |
|
|
614 | clients in the world, the larger the load the ntp servers need to |
|
|
615 | shoulder. In environments like home networks though, we can help |
|
|
616 | keep the load down on public servers while still providing the proper |
|
|
617 | time to all our computers. As an added bonus, our private updates |
|
|
618 | will be a lot faster for the clients too! All we have to do is run |
|
|
619 | a ntp server on our router that synchronizes itself with the public |
|
|
620 | internet servers while providing the time to the rest of the computers |
|
|
621 | in the network. To get started, simply <c>emerge ntp</c> on the |
|
|
622 | router. |
|
|
623 | </p> |
|
|
624 | |
|
|
625 | <pre caption="Setting up the NTP server"> |
|
|
626 | # <i>nano /etc/conf.d/ntp-client</i> |
|
|
627 | <comment>Customize if you wish but the defaults should be fine</comment> |
|
|
628 | # <i>rc-update add ntp-client default</i> |
|
|
629 | |
|
|
630 | # <i>nano /etc/ntp.conf</i> |
|
|
631 | <comment>Add the follwing lines: |
|
|
632 | restrict default ignore |
|
|
633 | restrict 192.168.0.0 mask 255.255.255.0 notrust nomodify notrap |
|
|
634 | These will allow only ntp clients with an IP address in the 192.168.0.xxx range to use your ntp server</comment> |
|
|
635 | # <i>nano /etc/conf.d/ntpd</i> |
|
|
636 | <comment>Customize if you wish but the defaults should be fine</comment> |
|
|
637 | |
|
|
638 | # <i>/etc/init.d/ntp-client start</i> |
|
|
639 | # <i>/etc/init.d/ntpd start</i> |
|
|
640 | </pre> |
|
|
641 | |
|
|
642 | <p> |
|
|
643 | Now, on your clients, have them <c>emerge ntp</c> also. However, |
|
|
644 | we will just run the ntp client so setup is a lot simpler. |
|
|
645 | </p> |
|
|
646 | |
|
|
647 | <pre caption="Setting up a NTP client"> |
|
|
648 | # <i>nano /etc/conf.d/ntp-client</i> |
|
|
649 | <comment>Change the 'pool.ntp.org' server in the NTPCLIENT_OPTS variable to '192.168.0.1'</comment> |
|
|
650 | # <i>rc-update add ntp-client default</i> |
|
|
651 | # <i>/etc/init.d/ntp-client start</i> |
|
|
652 | </pre> |
|
|
653 | </body> |
|
|
654 | </section> |
|
|
655 | |
|
|
656 | <section> |
| 603 | <title>Mail Server</title> |
657 | <title>Mail Server</title> |
| 604 | <body> |
658 | <body> |
| 605 | <p> |
659 | <p> |
| 606 | Sometimes it's nice to run your own Simple Mail Transfer Protocol (SMTP) |
660 | Sometimes it's nice to run your own Simple Mail Transfer Protocol (SMTP) |
| 607 | server on the router. You may have your own reason for wanting to do so, |
661 | server on the router. You may have your own reason for wanting to do so, |