|
Lines 2127-2132
Link Here
|
| 2127 |
instructions provided with it.</para> |
2127 |
instructions provided with it.</para> |
| 2128 |
</sect2> |
2128 |
</sect2> |
| 2129 |
|
2129 |
|
|
|
2130 |
<sect2> |
| 2131 |
<title>Using mpd</title> |
| 2132 |
|
| 2133 |
<para>You can use <application>mpd</application> to connect to a |
| 2134 |
variety of services, in particular pptp services. You can find |
| 2135 |
<application>mpd</application> in the ports collection, |
| 2136 |
<filename role="package">net/mpd</filename>.</para> |
| 2137 |
|
| 2138 |
<para>First you must install the port, and then you can configure |
| 2139 |
<application>mpd</application> to suit your requirements and |
| 2140 |
provider settings. The port places a set of sample configuration |
| 2141 |
files which are well documented in |
| 2142 |
<filename><replaceable>PREFIX</replaceable>/etc/mpd/</filename>. |
| 2143 |
Note here that <emphasis>PREFIX</emphasis> means the directory |
| 2144 |
into which your ports are installed, this defaults to |
| 2145 |
<filename>/usr/local/</filename>. A complete guide to to |
| 2146 |
configuring <application>mpd</application> is available in HTML |
| 2147 |
format once the port has been installed. It is placed in |
| 2148 |
<filename><replaceable>PREFIX</replaceable>/share/mpd/</filename>. |
| 2149 |
Here is a sample configuration for connecting to an ADSL service |
| 2150 |
with <application>mpd</application>. The configuration is spread |
| 2151 |
over two files, first the <filename>mpd.conf</filename>.</para> |
| 2152 |
|
| 2153 |
<programlisting>default: |
| 2154 |
load adsl |
| 2155 |
|
| 2156 |
adsl: |
| 2157 |
new -i ng0 adsl adsl |
| 2158 |
set bundle authname <replaceable>username</replaceable> <co |
| 2159 |
id="co-mpd-ex-user"> |
| 2160 |
set bundle password <replaceable>password</replaceable> <co |
| 2161 |
id="co-mpd-ex-pass"> |
| 2162 |
set bundle disable multilink |
| 2163 |
|
| 2164 |
set link no pap actcomp protocomp |
| 2165 |
set link disable chap |
| 2166 |
set link accept chap |
| 2167 |
set link keep-alive 30 10 |
| 2168 |
|
| 2169 |
set ipcp no vjcomp |
| 2170 |
set ipcp ranges 0.0.0.0/0 0.0.0.0/0 |
| 2171 |
|
| 2172 |
set iface route default |
| 2173 |
set iface disable on-demand |
| 2174 |
set iface enable proxy-arp |
| 2175 |
set iface idle 0 |
| 2176 |
|
| 2177 |
open</programlisting> |
| 2178 |
|
| 2179 |
<calloutlist> |
| 2180 |
<callout arearefs="co-mpd-ex-user"> |
| 2181 |
<para>The username used to authenticate with your ISP.</para> |
| 2182 |
</callout> |
| 2183 |
<callout arearefs="co-mpd-ex-pass"> |
| 2184 |
<para>The password used to authenticate with your ISP.</para> |
| 2185 |
</callout> |
| 2186 |
</calloutlist> |
| 2187 |
|
| 2188 |
<para>The <filename>mpd.links</filename> file contains information |
| 2189 |
about the link, or links, you wish to establish. An example |
| 2190 |
<filename>mpd.links</filename> to accompany the above example is |
| 2191 |
given beneath.</para> |
| 2192 |
|
| 2193 |
<programlisting>adsl: |
| 2194 |
set link type pptp |
| 2195 |
set pptp mode active |
| 2196 |
set pptp enable originate incoming outcall |
| 2197 |
set pptp self 10.0.0.140 |
| 2198 |
set pptp peer 10.0.0.138</programlisting> |
| 2199 |
|
| 2200 |
<para>It is possible to initialise the connection easily by issuing |
| 2201 |
the following command as <username>root</username>.</para> |
| 2202 |
|
| 2203 |
<screen>&prompt.root; <userinput>mpd -b</userinput><replaceable>adsl</replaceable></screen> |
| 2204 |
|
| 2205 |
<para>You can see the status of the connection with the following |
| 2206 |
command.</para> |
| 2207 |
|
| 2208 |
<screen>&prompt.user; <userinput>ifconfig <replaceable>ng0</replaceable></userinput> |
| 2209 |
ng0: flags=88d1<UP,POINTOPOINT,RUNNING,NOARP,SIMPLEX,MULTICAST> mtu 1500 |
| 2210 |
inet 216.136.204.117 --> 204.152.186.171 netmask 0xffffffff</screen> |
| 2211 |
|
| 2212 |
<para>Using <application>mpd</application> is the recommended way to |
| 2213 |
connect to an ADSL service with &os;.</para> |
| 2214 |
|
| 2215 |
</sect2> |
| 2216 |
|
| 2130 |
<sect2> |
2217 |
<sect2> |
| 2131 |
<title>Using pptpclient</title> |
2218 |
<title>Using pptpclient</title> |
| 2132 |
|
2219 |
|
|
Lines 2147-2162
Link Here
|
| 2147 |
set log phase chat lcp ipcp ccp tun command |
2234 |
set log phase chat lcp ipcp ccp tun command |
| 2148 |
set timeout 0 |
2235 |
set timeout 0 |
| 2149 |
enable dns |
2236 |
enable dns |
| 2150 |
set authname <replaceable>username</replaceable> <co id="co-ex-user"> |
2237 |
set authname <replaceable>username</replaceable> <co id="co-pptp-ex-user"> |
| 2151 |
set authkey <replaceable>password</replaceable> <co id="co-ex-pass"> |
2238 |
set authkey <replaceable>password</replaceable> <co id="co-pptp-ex-pass"> |
| 2152 |
set ifaddr 0 0 |
2239 |
set ifaddr 0 0 |
| 2153 |
add default HISADDR</programlisting> |
2240 |
add default HISADDR</programlisting> |
| 2154 |
|
2241 |
|
| 2155 |
<calloutlist> |
2242 |
<calloutlist> |
| 2156 |
<callout arearefs="co-ex-user"> |
2243 |
<callout arearefs="co-pptp-ex-user"> |
| 2157 |
<para>The username of your account with the DSL provider.</para> |
2244 |
<para>The username of your account with the DSL provider.</para> |
| 2158 |
</callout> |
2245 |
</callout> |
| 2159 |
<callout arearefs="co-ex-pass"> |
2246 |
<callout arearefs="co-pptp-ex-pass"> |
| 2160 |
<para>The password for your account.</para> |
2247 |
<para>The password for your account.</para> |
| 2161 |
</callout> |
2248 |
</callout> |
| 2162 |
</calloutlist> |
2249 |
</calloutlist> |