<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://freebsdwiki.net/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://freebsdwiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=GNUtoo</id>
		<title>FreeBSDwiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://freebsdwiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=GNUtoo"/>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Special:Contributions/GNUtoo"/>
		<updated>2026-04-05T11:38:56Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.18.0</generator>

	<entry>
		<id>http://freebsdwiki.net/index.php/Openvpn_with_fixed_ips</id>
		<title>Openvpn with fixed ips</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Openvpn_with_fixed_ips"/>
				<updated>2008-07-11T22:02:39Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
We already explored openvpn with dhcp...here we will have fixed ips without dhcp...here's the setting:&lt;br /&gt;
*isc-dhcp40-server&lt;br /&gt;
*bind95&lt;br /&gt;
*openvpn&lt;br /&gt;
with this setup we will be able to see the internal network from an external connection:&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
here's openvpn.conf:&lt;br /&gt;
 ca /usr/local/etc/openvpn/keys/ca.crt&lt;br /&gt;
 cert /usr/local/etc/openvpn/keys/server.crt&lt;br /&gt;
 key /usr/local/etc/openvpn/keys/server.key&lt;br /&gt;
 dh /usr/local/etc/openvpn/keys/dh1024.pem&lt;br /&gt;
 # USE TAP ON SERVER AND CLIENT SIDE !&lt;br /&gt;
 dev tap&lt;br /&gt;
 #ifconfig-pool-persist ipp.txt&lt;br /&gt;
 # replace 192.168.1.101 with the VPN IP&lt;br /&gt;
 server-bridge 192.168.0.1 255.255.254.0 192.168.0.2 192.168.0.250&lt;br /&gt;
 keepalive 10 120&lt;br /&gt;
 client-to-client&lt;br /&gt;
 verb 3&lt;br /&gt;
 duplicate-cn&lt;br /&gt;
 push &amp;quot;route-gateway 192.168.0.1&amp;quot;&lt;br /&gt;
 push &amp;quot;dhcp-option DNS 192.168.0.1&amp;quot; # push DNS entries to openvpn client&lt;br /&gt;
 push &amp;quot;redirect-gateway&amp;quot;&lt;br /&gt;
 #redirect-gateway&lt;br /&gt;
 client-config-dir /usr/local/etc/openvpn/config&lt;br /&gt;
&lt;br /&gt;
here's the content of a client config in /usr/local/etc/openvpn/config i named this file with the name of the certificate: port4 : that is needed so it will assign this ip to the owner of the port4 certificate&lt;br /&gt;
 ifconfig-push 192.168.0.107 255.255.254.0&lt;br /&gt;
&lt;br /&gt;
here's the content of /usr/local/etc/dhcpd.conf&lt;br /&gt;
 option domain-name &amp;quot;workgroup&amp;quot;;&lt;br /&gt;
 ddns-update-style none;&lt;br /&gt;
 class &amp;quot;openvpn&amp;quot; {&lt;br /&gt;
         match if substring (hardware,1,2) = 00:ff;&lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
         option routers 192.168.1.1;&lt;br /&gt;
         option domain-name-servers 192.168.1.1;&lt;br /&gt;
         pool {&lt;br /&gt;
                 deny members of &amp;quot;openvpn&amp;quot;;&lt;br /&gt;
                 allow unknown-clients;&lt;br /&gt;
                 allow known-clients;&lt;br /&gt;
                 ddns-updates off;&lt;br /&gt;
                 range 192.168.1.100 192.168.1.199;&lt;br /&gt;
         }&lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 host port4 {&lt;br /&gt;
   hardware ethernet 00:16:6f:b9:02:a4;&lt;br /&gt;
   fixed-address 192.168.1.107;&lt;br /&gt;
 }&lt;br /&gt;
here we match for mac address that starts by 00:ff,because tap devices do,and we assign them to the openvpn class...&lt;br /&gt;
then we allow known and unknown clients but deny the right of the client's tap interface to get an ip in this range&lt;br /&gt;
then at the end we assign an ip to a client...that makes the ports redirections easier&lt;br /&gt;
&lt;br /&gt;
here's my bind configuration:&lt;br /&gt;
 // $FreeBSD: src/etc/namedb/named.conf,v 1.26.4.1 2008/01/13 20:48:23 dougb Exp $&lt;br /&gt;
 //&lt;br /&gt;
 // Refer to the named.conf(5) and named(8) man pages, and the documentation&lt;br /&gt;
 // in /usr/share/doc/bind9 for more details.&lt;br /&gt;
 //&lt;br /&gt;
 // If you are going to set up an authoritative server, make sure you&lt;br /&gt;
 // understand the hairy details of how DNS works.  Even with&lt;br /&gt;
 // simple mistakes, you can break connectivity for affected parties,&lt;br /&gt;
 // or cause huge amounts of useless Internet traffic.&lt;br /&gt;
 &lt;br /&gt;
 options {&lt;br /&gt;
         // Relative to the chroot directory, if any&lt;br /&gt;
         directory       &amp;quot;/etc/namedb&amp;quot;;&lt;br /&gt;
         pid-file        &amp;quot;/var/run/named/pid&amp;quot;;&lt;br /&gt;
         dump-file       &amp;quot;/var/dump/named_dump.db&amp;quot;;&lt;br /&gt;
         statistics-file &amp;quot;/var/stats/named.stats&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 // If named is being used only as a local resolver, this is a safe default.&lt;br /&gt;
 // For named to be accessible to the network, comment this option, specify&lt;br /&gt;
 // the proper IP address, or delete this option.&lt;br /&gt;
         listen-on       { 127.0.0.1; 192.168.0.1; 192.168.1.1; };&lt;br /&gt;
 &lt;br /&gt;
 // If you have IPv6 enabled on this system, uncomment this option for&lt;br /&gt;
 // use as a local resolver.  To give access to the network, specify&lt;br /&gt;
 // an IPv6 address, or the keyword &amp;quot;any&amp;quot;.&lt;br /&gt;
 //      listen-on-v6    { ::1; };&lt;br /&gt;
 &lt;br /&gt;
 // These zones are already covered by the empty zones listed below.&lt;br /&gt;
 // If you remove the related empty zones below, comment these lines out.&lt;br /&gt;
         disable-empty-zone &amp;quot;255.255.255.255.IN-ADDR.ARPA&amp;quot;;&lt;br /&gt;
         disable-empty-zone &amp;quot;0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA&amp;quot;;&lt;br /&gt;
         disable-empty-zone &amp;quot;1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 // In addition to the &amp;quot;forwarders&amp;quot; clause, you can force your name&lt;br /&gt;
 // server to never initiate queries of its own, but always ask its&lt;br /&gt;
 // forwarders only, by enabling the following line:&lt;br /&gt;
 //&lt;br /&gt;
 //      forward only;&lt;br /&gt;
 &lt;br /&gt;
 // If you've got a DNS server around at your upstream provider, enter&lt;br /&gt;
 // its IP address here, and enable the line below.  This will make you&lt;br /&gt;
 // benefit from its cache, thus reduce overall DNS traffic in the Internet.&lt;br /&gt;
 /*&lt;br /&gt;
         forwarders {&lt;br /&gt;
                 127.0.0.1;&lt;br /&gt;
         };&lt;br /&gt;
 */&lt;br /&gt;
         /*&lt;br /&gt;
          * If there is a firewall between you and nameservers you want&lt;br /&gt;
          * to talk to, you might need to uncomment the query-source&lt;br /&gt;
          * directive below.  Previous versions of BIND always asked&lt;br /&gt;
          * questions using port 53, but BIND versions 8 and later&lt;br /&gt;
          * use a pseudo-random unprivileged UDP port by default.&lt;br /&gt;
          */&lt;br /&gt;
         // query-source address * port 53;&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 // If you enable a local name server, don't forget to enter 127.0.0.1&lt;br /&gt;
 // first in your /etc/resolv.conf so this server will be queried.&lt;br /&gt;
 // Also, make sure to enable it in /etc/rc.conf.&lt;br /&gt;
 &lt;br /&gt;
 // The traditional root hints mechanism. Use this, OR the slave zones below.&lt;br /&gt;
 //zone &amp;quot;.&amp;quot; { type hint; file &amp;quot;named.root&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 /*      Slaving the following zones from the root name servers has some&lt;br /&gt;
         significant advantages:&lt;br /&gt;
         1. Faster local resolution for your users&lt;br /&gt;
         2. No spurious traffic will be sent from your network to the roots&lt;br /&gt;
         3. Greater resilience to any potential root server failure/DDoS&lt;br /&gt;
 &lt;br /&gt;
         On the other hand, this method requires more monitoring than the&lt;br /&gt;
         hints file to be sure that an unexpected failure mode has not&lt;br /&gt;
         incapacitated your server.  Name servers that are serving a lot&lt;br /&gt;
         of clients will benefit more from this approach than individual&lt;br /&gt;
         hosts.  Use with caution.&lt;br /&gt;
 &lt;br /&gt;
         To use this mechanism, uncomment the entries below, and comment&lt;br /&gt;
         the hint zone above.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 zone &amp;quot;.&amp;quot; {&lt;br /&gt;
         type slave;&lt;br /&gt;
         file &amp;quot;slave/root.slave&amp;quot;;&lt;br /&gt;
         masters {&lt;br /&gt;
                 192.5.5.241;    // F.ROOT-SERVERS.NET.&lt;br /&gt;
         };&lt;br /&gt;
         notify no;&lt;br /&gt;
 };&lt;br /&gt;
 zone &amp;quot;arpa&amp;quot; {&lt;br /&gt;
         type slave;&lt;br /&gt;
         file &amp;quot;slave/arpa.slave&amp;quot;;&lt;br /&gt;
         masters {&lt;br /&gt;
                 192.5.5.241;    // F.ROOT-SERVERS.NET.&lt;br /&gt;
         };&lt;br /&gt;
         notify no;&lt;br /&gt;
 };&lt;br /&gt;
 zone &amp;quot;in-addr.arpa&amp;quot; {&lt;br /&gt;
         type slave;&lt;br /&gt;
         file &amp;quot;slave/in-addr.arpa.slave&amp;quot;;&lt;br /&gt;
         masters {&lt;br /&gt;
                 192.5.5.241;    // F.ROOT-SERVERS.NET.&lt;br /&gt;
         };&lt;br /&gt;
         notify no;&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 /*      Serving the following zones locally will prevent any queries&lt;br /&gt;
         for these zones leaving your network and going to the root&lt;br /&gt;
         name servers.  This has two significant advantages:&lt;br /&gt;
         1. Faster local resolution for your users&lt;br /&gt;
         2. No spurious traffic will be sent from your network to the roots&lt;br /&gt;
 */&lt;br /&gt;
 // RFC 1912&lt;br /&gt;
 zone &amp;quot;localhost&amp;quot;        { type master; file &amp;quot;master/localhost-forward.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;127.in-addr.arpa&amp;quot; { type master; file &amp;quot;master/localhost-reverse.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;255.in-addr.arpa&amp;quot; { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // RFC 1912-style zone for IPv6 localhost address&lt;br /&gt;
 zone &amp;quot;0.ip6.arpa&amp;quot;       { type master; file &amp;quot;master/localhost-reverse.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // &amp;quot;This&amp;quot; Network (RFCs 1912 and 3330)&lt;br /&gt;
 zone &amp;quot;0.in-addr.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // Private Use Networks (RFC 1918)&lt;br /&gt;
 zone &amp;quot;10.in-addr.arpa&amp;quot;          { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;16.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;17.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;18.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;19.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;20.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;21.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;22.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;23.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;24.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;25.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;26.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;27.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;28.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;29.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;30.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;31.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;168.192.in-addr.arpa&amp;quot;     { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // Link-local/APIPA (RFCs 3330 and 3927)&lt;br /&gt;
 zone &amp;quot;254.169.in-addr.arpa&amp;quot;     { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // TEST-NET for Documentation (RFC 3330)&lt;br /&gt;
 zone &amp;quot;2.0.192.in-addr.arpa&amp;quot;     { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // Router Benchmark Testing (RFC 3330)&lt;br /&gt;
 zone &amp;quot;18.198.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;19.198.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // IANA Reserved - Old Class E Space&lt;br /&gt;
 zone &amp;quot;240.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;241.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;242.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;243.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;244.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;245.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;246.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;247.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;248.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;249.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;250.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;251.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;252.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;253.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;254.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // IPv6 Unassigned Addresses (RFC 4291)&lt;br /&gt;
 zone &amp;quot;1.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;3.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;4.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;5.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;6.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;7.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;8.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;9.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;a.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;b.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;c.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;d.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;e.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;0.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;1.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;2.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;3.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;4.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;5.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;6.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;7.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;8.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;9.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;a.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;b.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;0.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;1.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;2.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;3.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;4.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;5.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;6.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;7.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // IPv6 ULA (RFC 4193)&lt;br /&gt;
 zone &amp;quot;c.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;d.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // IPv6 Link Local (RFC 4291)&lt;br /&gt;
 zone &amp;quot;8.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;9.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;a.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;b.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // IPv6 Deprecated Site-Local Addresses (RFC 3879)&lt;br /&gt;
 zone &amp;quot;c.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;d.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;e.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;f.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // IP6.INT is Deprecated (RFC 4159)&lt;br /&gt;
 zone &amp;quot;ip6.int&amp;quot;                  { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // NB: Do not use the IP addresses below, they are faked, and only&lt;br /&gt;
 // serve demonstration/documentation purposes!&lt;br /&gt;
 //&lt;br /&gt;
 // Example slave zone config entries.  It can be convenient to become&lt;br /&gt;
 // a slave at least for the zone your own domain is in.  Ask&lt;br /&gt;
 // your network administrator for the IP address of the responsible&lt;br /&gt;
 // master name server.&lt;br /&gt;
 //&lt;br /&gt;
 // Do not forget to include the reverse lookup zone!&lt;br /&gt;
 // This is named after the first bytes of the IP address, in reverse&lt;br /&gt;
 // order, with &amp;quot;.IN-ADDR.ARPA&amp;quot; appended, or &amp;quot;.IP6.ARPA&amp;quot; for IPv6.&lt;br /&gt;
 //&lt;br /&gt;
 // Before starting to set up a master zone, make sure you fully&lt;br /&gt;
 // understand how DNS and BIND work.  There are sometimes&lt;br /&gt;
 // non-obvious pitfalls.  Setting up a slave zone is usually simpler.&lt;br /&gt;
 //&lt;br /&gt;
 // NB: Don't blindly enable the examples below. :-)  Use actual names&lt;br /&gt;
 // and addresses instead.&lt;br /&gt;
 &lt;br /&gt;
 /* An example dynamic zone&lt;br /&gt;
 key &amp;quot;exampleorgkey&amp;quot; {&lt;br /&gt;
         algorithm hmac-md5;&lt;br /&gt;
         secret &amp;quot;sf87HJqjkqh8ac87a02lla==&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
 zone &amp;quot;example.org&amp;quot; {&lt;br /&gt;
         type master;&lt;br /&gt;
         allow-update {&lt;br /&gt;
                 key &amp;quot;exampleorgkey&amp;quot;;&lt;br /&gt;
         };&lt;br /&gt;
         file &amp;quot;dynamic/example.org&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 /* Example of a slave reverse zone&lt;br /&gt;
 zone &amp;quot;1.168.192.in-addr.arpa&amp;quot; {&lt;br /&gt;
         type slave;&lt;br /&gt;
         file &amp;quot;slave/1.168.192.in-addr.arpa&amp;quot;;&lt;br /&gt;
         masters {&lt;br /&gt;
                 192.168.1.1;&lt;br /&gt;
         };&lt;br /&gt;
 };&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 zone &amp;quot;workgroup&amp;quot; {&lt;br /&gt;
     type master;&lt;br /&gt;
     file &amp;quot;master/workgroup&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
and here's my local &amp;quot;workgroup&amp;quot; file that lies in /etc/namedb/master/workgroup&lt;br /&gt;
&lt;br /&gt;
 $TTL 3600        ; 1 hour&lt;br /&gt;
 workgroup.    IN      SOA      192.168.1.1 admin.workgroup. (&lt;br /&gt;
                                 2008071102      ; Serial&lt;br /&gt;
                                 10800           ; Refresh&lt;br /&gt;
                                 3600            ; Retry&lt;br /&gt;
                                 604800          ; Expire&lt;br /&gt;
                                 86400           ; Minimum TTL&lt;br /&gt;
                         )&lt;br /&gt;
 ; DNS Servers&lt;br /&gt;
                 IN      NS      192.168.1.1&lt;br /&gt;
                 IN      NS      192.168.1.1 &lt;br /&gt;
 &lt;br /&gt;
 ; Machine Names&lt;br /&gt;
 localhost       IN      A       127.0.0.1&lt;br /&gt;
 router          IN      A       192.168.1.1&lt;br /&gt;
 port4           IN      A       192.168.1.107&lt;br /&gt;
 ; Aliases&lt;br /&gt;
 www     &lt;br /&gt;
&lt;br /&gt;
basically i followed the comments in the file and have set-up a slave...&lt;br /&gt;
i've also changed on what interface it listen...&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Openvpn_with_fixed_ips</id>
		<title>Openvpn with fixed ips</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Openvpn_with_fixed_ips"/>
				<updated>2008-07-11T21:58:48Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
We already explored openvpn with dhcp...here we will have fixed ips without dhcp...here's the setting:&lt;br /&gt;
*isc-dhcp40-server&lt;br /&gt;
*bind95&lt;br /&gt;
*openvpn&lt;br /&gt;
with this setup we will be able to see the internal network from an external connection:&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
here's openvpn.conf:&lt;br /&gt;
 ca /usr/local/etc/openvpn/keys/ca.crt&lt;br /&gt;
 cert /usr/local/etc/openvpn/keys/server.crt&lt;br /&gt;
 key /usr/local/etc/openvpn/keys/server.key&lt;br /&gt;
 dh /usr/local/etc/openvpn/keys/dh1024.pem&lt;br /&gt;
 # USE TAP ON SERVER AND CLIENT SIDE !&lt;br /&gt;
 dev tap&lt;br /&gt;
 #ifconfig-pool-persist ipp.txt&lt;br /&gt;
 # replace 192.168.1.101 with the VPN IP&lt;br /&gt;
 server-bridge 192.168.0.1 255.255.254.0 192.168.0.2 192.168.0.250&lt;br /&gt;
 keepalive 10 120&lt;br /&gt;
 client-to-client&lt;br /&gt;
 verb 3&lt;br /&gt;
 duplicate-cn&lt;br /&gt;
 push &amp;quot;route-gateway 192.168.0.1&amp;quot;&lt;br /&gt;
 push &amp;quot;dhcp-option DNS 192.168.0.1&amp;quot; # push DNS entries to openvpn client&lt;br /&gt;
 push &amp;quot;redirect-gateway&amp;quot;&lt;br /&gt;
 #redirect-gateway&lt;br /&gt;
 client-config-dir /usr/local/etc/openvpn/config&lt;br /&gt;
&lt;br /&gt;
here's the content of a client config in /usr/local/etc/openvpn/config i named this file with the name of the certificate: port4 : that is needed so it will assign this ip to the owner of the port4 certificate&lt;br /&gt;
 ifconfig-push 192.168.0.107 255.255.254.0&lt;br /&gt;
&lt;br /&gt;
here's the content of /usr/local/etc/dhcpd.conf&lt;br /&gt;
 option domain-name &amp;quot;workgroup&amp;quot;;&lt;br /&gt;
 ddns-update-style none;&lt;br /&gt;
 class &amp;quot;openvpn&amp;quot; {&lt;br /&gt;
         match if substring (hardware,1,2) = 00:ff;&lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
         option routers 192.168.1.1;&lt;br /&gt;
         option domain-name-servers 192.168.1.1;&lt;br /&gt;
         pool {&lt;br /&gt;
                 deny members of &amp;quot;openvpn&amp;quot;;&lt;br /&gt;
                 allow unknown-clients;&lt;br /&gt;
                 allow known-clients;&lt;br /&gt;
                 ddns-updates off;&lt;br /&gt;
                 range 192.168.1.100 192.168.1.199;&lt;br /&gt;
         }&lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 host port4 {&lt;br /&gt;
   hardware ethernet 00:16:6f:b9:02:a4;&lt;br /&gt;
   fixed-address 192.168.1.107;&lt;br /&gt;
 }&lt;br /&gt;
here we match for mac address that starts by 00:ff,because tap devices do,and we assign them to the openvpn class...&lt;br /&gt;
then we allow known and unknown clients but deny the right of the client's tap interface to get an ip in this range&lt;br /&gt;
then at the end we assign an ip to a client...that makes the ports redirections easier&lt;br /&gt;
&lt;br /&gt;
here's my bind configuration:&lt;br /&gt;
 // $FreeBSD: src/etc/namedb/named.conf,v 1.26.4.1 2008/01/13 20:48:23 dougb Exp $&lt;br /&gt;
 //&lt;br /&gt;
 // Refer to the named.conf(5) and named(8) man pages, and the documentation&lt;br /&gt;
 // in /usr/share/doc/bind9 for more details.&lt;br /&gt;
 //&lt;br /&gt;
 // If you are going to set up an authoritative server, make sure you&lt;br /&gt;
 // understand the hairy details of how DNS works.  Even with&lt;br /&gt;
 // simple mistakes, you can break connectivity for affected parties,&lt;br /&gt;
 // or cause huge amounts of useless Internet traffic.&lt;br /&gt;
 &lt;br /&gt;
 options {&lt;br /&gt;
         // Relative to the chroot directory, if any&lt;br /&gt;
         directory       &amp;quot;/etc/namedb&amp;quot;;&lt;br /&gt;
         pid-file        &amp;quot;/var/run/named/pid&amp;quot;;&lt;br /&gt;
         dump-file       &amp;quot;/var/dump/named_dump.db&amp;quot;;&lt;br /&gt;
         statistics-file &amp;quot;/var/stats/named.stats&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 // If named is being used only as a local resolver, this is a safe default.&lt;br /&gt;
 // For named to be accessible to the network, comment this option, specify&lt;br /&gt;
 // the proper IP address, or delete this option.&lt;br /&gt;
         listen-on       { 127.0.0.1; 192.168.0.1; 192.168.1.1; };&lt;br /&gt;
 &lt;br /&gt;
 // If you have IPv6 enabled on this system, uncomment this option for&lt;br /&gt;
 // use as a local resolver.  To give access to the network, specify&lt;br /&gt;
 // an IPv6 address, or the keyword &amp;quot;any&amp;quot;.&lt;br /&gt;
 //      listen-on-v6    { ::1; };&lt;br /&gt;
 &lt;br /&gt;
 // These zones are already covered by the empty zones listed below.&lt;br /&gt;
 // If you remove the related empty zones below, comment these lines out.&lt;br /&gt;
         disable-empty-zone &amp;quot;255.255.255.255.IN-ADDR.ARPA&amp;quot;;&lt;br /&gt;
         disable-empty-zone &amp;quot;0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA&amp;quot;;&lt;br /&gt;
         disable-empty-zone &amp;quot;1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 // In addition to the &amp;quot;forwarders&amp;quot; clause, you can force your name&lt;br /&gt;
 // server to never initiate queries of its own, but always ask its&lt;br /&gt;
 // forwarders only, by enabling the following line:&lt;br /&gt;
 //&lt;br /&gt;
 //      forward only;&lt;br /&gt;
 &lt;br /&gt;
 // If you've got a DNS server around at your upstream provider, enter&lt;br /&gt;
 // its IP address here, and enable the line below.  This will make you&lt;br /&gt;
 // benefit from its cache, thus reduce overall DNS traffic in the Internet.&lt;br /&gt;
 /*&lt;br /&gt;
         forwarders {&lt;br /&gt;
                 127.0.0.1;&lt;br /&gt;
         };&lt;br /&gt;
 */&lt;br /&gt;
         /*&lt;br /&gt;
          * If there is a firewall between you and nameservers you want&lt;br /&gt;
          * to talk to, you might need to uncomment the query-source&lt;br /&gt;
          * directive below.  Previous versions of BIND always asked&lt;br /&gt;
          * questions using port 53, but BIND versions 8 and later&lt;br /&gt;
          * use a pseudo-random unprivileged UDP port by default.&lt;br /&gt;
          */&lt;br /&gt;
         // query-source address * port 53;&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 // If you enable a local name server, don't forget to enter 127.0.0.1&lt;br /&gt;
 // first in your /etc/resolv.conf so this server will be queried.&lt;br /&gt;
 // Also, make sure to enable it in /etc/rc.conf.&lt;br /&gt;
 &lt;br /&gt;
 // The traditional root hints mechanism. Use this, OR the slave zones below.&lt;br /&gt;
 //zone &amp;quot;.&amp;quot; { type hint; file &amp;quot;named.root&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 /*      Slaving the following zones from the root name servers has some&lt;br /&gt;
         significant advantages:&lt;br /&gt;
         1. Faster local resolution for your users&lt;br /&gt;
         2. No spurious traffic will be sent from your network to the roots&lt;br /&gt;
         3. Greater resilience to any potential root server failure/DDoS&lt;br /&gt;
 &lt;br /&gt;
         On the other hand, this method requires more monitoring than the&lt;br /&gt;
         hints file to be sure that an unexpected failure mode has not&lt;br /&gt;
         incapacitated your server.  Name servers that are serving a lot&lt;br /&gt;
         of clients will benefit more from this approach than individual&lt;br /&gt;
         hosts.  Use with caution.&lt;br /&gt;
 &lt;br /&gt;
         To use this mechanism, uncomment the entries below, and comment&lt;br /&gt;
         the hint zone above.&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 zone &amp;quot;.&amp;quot; {&lt;br /&gt;
         type slave;&lt;br /&gt;
         file &amp;quot;slave/root.slave&amp;quot;;&lt;br /&gt;
         masters {&lt;br /&gt;
                 192.5.5.241;    // F.ROOT-SERVERS.NET.&lt;br /&gt;
         };&lt;br /&gt;
         notify no;&lt;br /&gt;
 };&lt;br /&gt;
 zone &amp;quot;arpa&amp;quot; {&lt;br /&gt;
         type slave;&lt;br /&gt;
         file &amp;quot;slave/arpa.slave&amp;quot;;&lt;br /&gt;
         masters {&lt;br /&gt;
                 192.5.5.241;    // F.ROOT-SERVERS.NET.&lt;br /&gt;
         };&lt;br /&gt;
         notify no;&lt;br /&gt;
 };&lt;br /&gt;
 zone &amp;quot;in-addr.arpa&amp;quot; {&lt;br /&gt;
         type slave;&lt;br /&gt;
         file &amp;quot;slave/in-addr.arpa.slave&amp;quot;;&lt;br /&gt;
         masters {&lt;br /&gt;
                 192.5.5.241;    // F.ROOT-SERVERS.NET.&lt;br /&gt;
         };&lt;br /&gt;
         notify no;&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 /*      Serving the following zones locally will prevent any queries&lt;br /&gt;
         for these zones leaving your network and going to the root&lt;br /&gt;
         name servers.  This has two significant advantages:&lt;br /&gt;
         1. Faster local resolution for your users&lt;br /&gt;
         2. No spurious traffic will be sent from your network to the roots&lt;br /&gt;
 */&lt;br /&gt;
 // RFC 1912&lt;br /&gt;
 zone &amp;quot;localhost&amp;quot;        { type master; file &amp;quot;master/localhost-forward.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;127.in-addr.arpa&amp;quot; { type master; file &amp;quot;master/localhost-reverse.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;255.in-addr.arpa&amp;quot; { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // RFC 1912-style zone for IPv6 localhost address&lt;br /&gt;
 zone &amp;quot;0.ip6.arpa&amp;quot;       { type master; file &amp;quot;master/localhost-reverse.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // &amp;quot;This&amp;quot; Network (RFCs 1912 and 3330)&lt;br /&gt;
 zone &amp;quot;0.in-addr.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // Private Use Networks (RFC 1918)&lt;br /&gt;
 zone &amp;quot;10.in-addr.arpa&amp;quot;          { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;16.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;17.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;18.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;19.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;20.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;21.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;22.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;23.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;24.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;25.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;26.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;27.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;28.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;29.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;30.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;31.172.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;168.192.in-addr.arpa&amp;quot;     { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // Link-local/APIPA (RFCs 3330 and 3927)&lt;br /&gt;
 zone &amp;quot;254.169.in-addr.arpa&amp;quot;     { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // TEST-NET for Documentation (RFC 3330)&lt;br /&gt;
 zone &amp;quot;2.0.192.in-addr.arpa&amp;quot;     { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // Router Benchmark Testing (RFC 3330)&lt;br /&gt;
 zone &amp;quot;18.198.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;19.198.in-addr.arpa&amp;quot;      { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // IANA Reserved - Old Class E Space&lt;br /&gt;
 zone &amp;quot;240.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;241.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;242.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;243.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;244.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;245.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;246.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;247.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;248.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;249.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;250.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;251.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;252.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;253.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;254.in-addr.arpa&amp;quot;         { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // IPv6 Unassigned Addresses (RFC 4291)&lt;br /&gt;
 zone &amp;quot;1.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;3.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;4.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;5.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;6.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;7.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;8.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;9.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;a.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;b.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;c.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;d.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;e.ip6.arpa&amp;quot;               { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;0.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;1.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;2.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;3.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;4.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;5.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;6.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;7.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;8.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;9.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;a.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;b.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;0.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;1.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;2.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;3.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;4.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;5.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;6.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;7.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // IPv6 ULA (RFC 4193)&lt;br /&gt;
 zone &amp;quot;c.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;d.f.ip6.arpa&amp;quot;             { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // IPv6 Link Local (RFC 4291)&lt;br /&gt;
 zone &amp;quot;8.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;9.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;a.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;b.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // IPv6 Deprecated Site-Local Addresses (RFC 3879)&lt;br /&gt;
 zone &amp;quot;c.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;d.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;e.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 zone &amp;quot;f.e.f.ip6.arpa&amp;quot;           { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // IP6.INT is Deprecated (RFC 4159)&lt;br /&gt;
 zone &amp;quot;ip6.int&amp;quot;                  { type master; file &amp;quot;master/empty.db&amp;quot;; };&lt;br /&gt;
 &lt;br /&gt;
 // NB: Do not use the IP addresses below, they are faked, and only&lt;br /&gt;
 // serve demonstration/documentation purposes!&lt;br /&gt;
 //&lt;br /&gt;
 // Example slave zone config entries.  It can be convenient to become&lt;br /&gt;
 // a slave at least for the zone your own domain is in.  Ask&lt;br /&gt;
 // your network administrator for the IP address of the responsible&lt;br /&gt;
 // master name server.&lt;br /&gt;
 //&lt;br /&gt;
 // Do not forget to include the reverse lookup zone!&lt;br /&gt;
 // This is named after the first bytes of the IP address, in reverse&lt;br /&gt;
 // order, with &amp;quot;.IN-ADDR.ARPA&amp;quot; appended, or &amp;quot;.IP6.ARPA&amp;quot; for IPv6.&lt;br /&gt;
 //&lt;br /&gt;
 // Before starting to set up a master zone, make sure you fully&lt;br /&gt;
 // understand how DNS and BIND work.  There are sometimes&lt;br /&gt;
 // non-obvious pitfalls.  Setting up a slave zone is usually simpler.&lt;br /&gt;
 //&lt;br /&gt;
 // NB: Don't blindly enable the examples below. :-)  Use actual names&lt;br /&gt;
 // and addresses instead.&lt;br /&gt;
 &lt;br /&gt;
 /* An example dynamic zone&lt;br /&gt;
 key &amp;quot;exampleorgkey&amp;quot; {&lt;br /&gt;
         algorithm hmac-md5;&lt;br /&gt;
         secret &amp;quot;sf87HJqjkqh8ac87a02lla==&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
 zone &amp;quot;example.org&amp;quot; {&lt;br /&gt;
         type master;&lt;br /&gt;
         allow-update {&lt;br /&gt;
                 key &amp;quot;exampleorgkey&amp;quot;;&lt;br /&gt;
         };&lt;br /&gt;
         file &amp;quot;dynamic/example.org&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 /* Example of a slave reverse zone&lt;br /&gt;
 zone &amp;quot;1.168.192.in-addr.arpa&amp;quot; {&lt;br /&gt;
         type slave;&lt;br /&gt;
         file &amp;quot;slave/1.168.192.in-addr.arpa&amp;quot;;&lt;br /&gt;
         masters {&lt;br /&gt;
                 192.168.1.1;&lt;br /&gt;
         };&lt;br /&gt;
 };&lt;br /&gt;
 */&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 zone &amp;quot;workgroup&amp;quot; {&lt;br /&gt;
     type master;&lt;br /&gt;
     file &amp;quot;master/workgroup&amp;quot;;&lt;br /&gt;
 };&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Openvpn_with_fixed_ips</id>
		<title>Openvpn with fixed ips</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Openvpn_with_fixed_ips"/>
				<updated>2008-07-11T21:51:01Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
We already explored openvpn with dhcp...here we will have fixed ips without dhcp...here's the setting:&lt;br /&gt;
*isc-dhcp40-server&lt;br /&gt;
*bind95&lt;br /&gt;
*openvpn&lt;br /&gt;
with this setup we will be able to see the internal network from an external connection:&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
here's openvpn.conf:&lt;br /&gt;
 ca /usr/local/etc/openvpn/keys/ca.crt&lt;br /&gt;
 cert /usr/local/etc/openvpn/keys/server.crt&lt;br /&gt;
 key /usr/local/etc/openvpn/keys/server.key&lt;br /&gt;
 dh /usr/local/etc/openvpn/keys/dh1024.pem&lt;br /&gt;
 # USE TAP ON SERVER AND CLIENT SIDE !&lt;br /&gt;
 dev tap&lt;br /&gt;
 #ifconfig-pool-persist ipp.txt&lt;br /&gt;
 # replace 192.168.1.101 with the VPN IP&lt;br /&gt;
 server-bridge 192.168.0.1 255.255.254.0 192.168.0.2 192.168.0.250&lt;br /&gt;
 keepalive 10 120&lt;br /&gt;
 client-to-client&lt;br /&gt;
 verb 3&lt;br /&gt;
 duplicate-cn&lt;br /&gt;
 push &amp;quot;route-gateway 192.168.0.1&amp;quot;&lt;br /&gt;
 push &amp;quot;dhcp-option DNS 192.168.0.1&amp;quot; # push DNS entries to openvpn client&lt;br /&gt;
 push &amp;quot;redirect-gateway&amp;quot;&lt;br /&gt;
 #redirect-gateway&lt;br /&gt;
 client-config-dir /usr/local/etc/openvpn/config&lt;br /&gt;
&lt;br /&gt;
here's the content of a client config in /usr/local/etc/openvpn/config i named this file with the name of the certificate: port4 : that is needed so it will assign this ip to the owner of the port4 certificate&lt;br /&gt;
 ifconfig-push 192.168.0.107 255.255.254.0&lt;br /&gt;
&lt;br /&gt;
here's the content of /usr/local/etc/dhcpd.conf&lt;br /&gt;
 option domain-name &amp;quot;workgroup&amp;quot;;&lt;br /&gt;
 ddns-update-style none;&lt;br /&gt;
 class &amp;quot;openvpn&amp;quot; {&lt;br /&gt;
         match if substring (hardware,1,2) = 00:ff;&lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
         option routers 192.168.1.1;&lt;br /&gt;
         option domain-name-servers 192.168.1.1;&lt;br /&gt;
         pool {&lt;br /&gt;
                 deny members of &amp;quot;openvpn&amp;quot;;&lt;br /&gt;
                 allow unknown-clients;&lt;br /&gt;
                 allow known-clients;&lt;br /&gt;
                 ddns-updates off;&lt;br /&gt;
                 range 192.168.1.100 192.168.1.199;&lt;br /&gt;
         }&lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 host port4 {&lt;br /&gt;
   hardware ethernet 00:16:6f:b9:02:a4;&lt;br /&gt;
   fixed-address 192.168.1.107;&lt;br /&gt;
 }&lt;br /&gt;
here we match for mac address that starts by 00:ff,because tap devices do,and we assign them to the openvpn class...&lt;br /&gt;
then we allow known and unknown clients but deny the right of the client's tap interface to get an ip in this range&lt;br /&gt;
then at the end we assign an ip to a client...that makes the ports redirections easier&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Openvpn_with_fixed_ips</id>
		<title>Openvpn with fixed ips</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Openvpn_with_fixed_ips"/>
				<updated>2008-07-11T21:48:05Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
We already explored openvpn with dhcp...here we will have fixed ips without dhcp...here's the setting:&lt;br /&gt;
*isc-dhcp40-server&lt;br /&gt;
*bind95&lt;br /&gt;
*openvpn&lt;br /&gt;
with this setup we will be able to see the internal network from an external connection:&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
here's openvpn.conf:&lt;br /&gt;
 ca /usr/local/etc/openvpn/keys/ca.crt&lt;br /&gt;
 cert /usr/local/etc/openvpn/keys/server.crt&lt;br /&gt;
 key /usr/local/etc/openvpn/keys/server.key&lt;br /&gt;
 dh /usr/local/etc/openvpn/keys/dh1024.pem&lt;br /&gt;
 # USE TAP ON SERVER AND CLIENT SIDE !&lt;br /&gt;
 dev tap&lt;br /&gt;
 #ifconfig-pool-persist ipp.txt&lt;br /&gt;
 # replace 192.168.1.101 with the VPN IP&lt;br /&gt;
 server-bridge 192.168.0.1 255.255.254.0 192.168.0.2 192.168.0.250&lt;br /&gt;
 keepalive 10 120&lt;br /&gt;
 client-to-client&lt;br /&gt;
 verb 3&lt;br /&gt;
 duplicate-cn&lt;br /&gt;
 push &amp;quot;route-gateway 192.168.0.1&amp;quot;&lt;br /&gt;
 push &amp;quot;dhcp-option DNS 192.168.0.1&amp;quot; # push DNS entries to openvpn client&lt;br /&gt;
 push &amp;quot;redirect-gateway&amp;quot;&lt;br /&gt;
 #redirect-gateway&lt;br /&gt;
 client-config-dir /usr/local/etc/openvpn/config&lt;br /&gt;
&lt;br /&gt;
here's the content of a client config in /usr/local/etc/openvpn/config i named this file with the name of the certificate: port4 : that is needed so it will assign this ip to the owner of the port4 certificate&lt;br /&gt;
 ifconfig-push 192.168.0.107 255.255.254.0&lt;br /&gt;
&lt;br /&gt;
here's the content of /usr/local/etc/dhcpd.conf&lt;br /&gt;
 option domain-name &amp;quot;workgroup&amp;quot;;&lt;br /&gt;
 ddns-update-style none;&lt;br /&gt;
 class &amp;quot;openvpn&amp;quot; {&lt;br /&gt;
         match if substring (hardware,1,2) = 00:ff;&lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 subnet 192.168.1.0 netmask 255.255.255.0 {&lt;br /&gt;
         option routers 192.168.1.1;&lt;br /&gt;
         option domain-name-servers 192.168.1.1;&lt;br /&gt;
         pool {&lt;br /&gt;
                 deny members of &amp;quot;openvpn&amp;quot;;&lt;br /&gt;
                 allow unknown-clients;&lt;br /&gt;
                 allow known-clients;&lt;br /&gt;
                 ddns-updates off;&lt;br /&gt;
                 range 192.168.1.100 192.168.1.199;&lt;br /&gt;
         }&lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 host port4 {&lt;br /&gt;
   hardware ethernet 00:16:6f:b9:02:a4;&lt;br /&gt;
   fixed-address 192.168.1.107;&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Openvpn_with_fixed_ips</id>
		<title>Openvpn with fixed ips</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Openvpn_with_fixed_ips"/>
				<updated>2008-07-11T21:46:04Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
We already explored openvpn with dhcp...here we will have fixed ips without dhcp...here's the setting:&lt;br /&gt;
*isc-dhcp40-server&lt;br /&gt;
*bind95&lt;br /&gt;
*openvpn&lt;br /&gt;
with this setup we will be able to see the internal network from an external connection:&lt;br /&gt;
&lt;br /&gt;
==Setup==&lt;br /&gt;
here's openvpn.conf:&lt;br /&gt;
 ca /usr/local/etc/openvpn/keys/ca.crt&lt;br /&gt;
 cert /usr/local/etc/openvpn/keys/server.crt&lt;br /&gt;
 key /usr/local/etc/openvpn/keys/server.key&lt;br /&gt;
 dh /usr/local/etc/openvpn/keys/dh1024.pem&lt;br /&gt;
 # USE TAP ON SERVER AND CLIENT SIDE !&lt;br /&gt;
 dev tap&lt;br /&gt;
 #ifconfig-pool-persist ipp.txt&lt;br /&gt;
 # replace 192.168.1.101 with the VPN IP&lt;br /&gt;
 server-bridge 192.168.0.1 255.255.254.0 192.168.0.2 192.168.0.250&lt;br /&gt;
 keepalive 10 120&lt;br /&gt;
 client-to-client&lt;br /&gt;
 verb 3&lt;br /&gt;
 duplicate-cn&lt;br /&gt;
 push &amp;quot;route-gateway 192.168.0.1&amp;quot;&lt;br /&gt;
 push &amp;quot;dhcp-option DNS 192.168.0.1&amp;quot; # push DNS entries to openvpn client&lt;br /&gt;
 push &amp;quot;redirect-gateway&amp;quot;&lt;br /&gt;
 #redirect-gateway&lt;br /&gt;
 client-config-dir /usr/local/etc/openvpn/config&lt;br /&gt;
&lt;br /&gt;
here's the content of a client config in /usr/local/etc/openvpn/config i named this file with the name of the certificate: port4 : that is needed so it will assign this ip to the owner of the port4 certificate&lt;br /&gt;
 ifconfig-push 192.168.0.107 255.255.254.0&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/DynDns</id>
		<title>DynDns</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/DynDns"/>
				<updated>2008-06-12T23:00:50Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
DynDns is one of the free(as in no cost) Dynamic DNS provider.A Dynamic Dns is a service that permit you to have your own address name (such as rails.homelinux.org/) so you can offer services such as SSH or web server(http://rails.homelinux.org/)&amp;lt;!--i took the first website comming from google...change it if you want--&amp;gt; while having a Dynamic ip...&lt;br /&gt;
==The setup==&lt;br /&gt;
I tried:&lt;br /&gt;
*updatedd: updatedd-wrapper doesn't have a rc.d mode so you need to create it yourseld&lt;br /&gt;
*ipcheck : doesn't work for me because it doesn't find my ip on my userspace pppoe interface(tun0)&lt;br /&gt;
*ddclient: comes with a rc.d script...that's the good one&lt;br /&gt;
It would be nice if the ppp daemon could call script when the ip changes...but as i don't know how to do it we will use the daemon mode of ddclient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
run this command in order to install ddclient:&lt;br /&gt;
 cd /usr/ports/dns/ddclient &amp;amp;&amp;amp; make config &amp;amp;&amp;amp; make install&lt;br /&gt;
then you need to configure it:&lt;br /&gt;
here's my config file:&lt;br /&gt;
 daemon=1				# check every 300 seconds&lt;br /&gt;
 syslog=yes				# log update msgs to syslog&lt;br /&gt;
 mail=root				# mail all msgs to root&lt;br /&gt;
 mail-failure=root			# mail failed update msgs to root&lt;br /&gt;
 pid=/var/run/ddclient.pid		# record PID in file.&lt;br /&gt;
 ssl=yes					# use ssl-support.  Works with ssl-library&lt;br /&gt;
 login=GNUtoo					# default login&lt;br /&gt;
 password=mypassword				# default password&lt;br /&gt;
 #mx=mx.for.your.host				# default MX&lt;br /&gt;
 #backupmx=yes|no				# host is primary MX?&lt;br /&gt;
 #wildcard=yes|no				# add wildcard CNAME?&lt;br /&gt;
  custom=yes,                            \&lt;br /&gt;
  server=members.dyndns.org,             \&lt;br /&gt;
  protocol=dyndns2                       \&lt;br /&gt;
  gnutoo.homelinux.org&lt;br /&gt;
you can do your own copying the sample file to /usr/local/etc/:&lt;br /&gt;
 cp /usr/local/etc/ddclient.conf.sample /usr/local/etc/ddclient.conf&lt;br /&gt;
and then editing it...&lt;br /&gt;
&lt;br /&gt;
then we will need to execute the script when the internet comes up:&lt;br /&gt;
add this to /etc/rc.conf:&lt;br /&gt;
 ddclient_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
then if you get insternet via ppp,pppoe,pppoa: create the ppp.linkup file with the following content:&lt;br /&gt;
 alice:&lt;br /&gt;
  !bg /usr/local/etc/rc.d/ddclient restart&lt;br /&gt;
&amp;lt;i&amp;gt;change alice to match the provider you defined in /etc/ppp.conf&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''BE CAREFULL...you have to wait some time between the time the internet comes up and ddclient is restarted'''''&lt;br /&gt;
[[Category:FreeBSD for Servers]]&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/DynDns</id>
		<title>DynDns</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/DynDns"/>
				<updated>2008-06-12T23:00:21Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
DynDns is one of the free(as in no cost) Dynamic DNS provider.A Dynamic Dns is a service that permit you to have your own address name (such as rails.homelinux.org/) so you can offer services such as SSH or web server(http://rails.homelinux.org/)&amp;lt;!--i took the first website comming from google...change it if you want--&amp;gt; while having a Dynamic ip...&lt;br /&gt;
==The setup==&lt;br /&gt;
I tried:&lt;br /&gt;
*updatedd: updatedd-wrapper doesn't have a rc.d mode so you need to create it yourseld&lt;br /&gt;
*ipcheck : doesn't work for me because it doesn't find my ip on my userspace pppoe interface(tun0)&lt;br /&gt;
*ddclient: comes with a rc.d script...that's the good one&lt;br /&gt;
It would be nice if the ppp daemon could call script when the ip changes...but as i don't know how to do it we will use the daemon mode of ddclient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
run this command in order to install ddclient:&lt;br /&gt;
 cd /usr/ports/dns/ddclient &amp;amp;&amp;amp; make config &amp;amp;&amp;amp; make install&lt;br /&gt;
then you need to configure it:&lt;br /&gt;
here's my config file:&lt;br /&gt;
 daemon=1				# check every 300 seconds&lt;br /&gt;
 syslog=yes				# log update msgs to syslog&lt;br /&gt;
 mail=root				# mail all msgs to root&lt;br /&gt;
 mail-failure=root			# mail failed update msgs to root&lt;br /&gt;
 pid=/var/run/ddclient.pid		# record PID in file.&lt;br /&gt;
 ssl=yes					# use ssl-support.  Works with&lt;br /&gt;
					# ssl-library&lt;br /&gt;
 login=GNUtoo					# default login&lt;br /&gt;
 password=mypassword				# default password&lt;br /&gt;
 #mx=mx.for.your.host				# default MX&lt;br /&gt;
 #backupmx=yes|no				# host is primary MX?&lt;br /&gt;
 #wildcard=yes|no				# add wildcard CNAME?&lt;br /&gt;
  custom=yes,                            \&lt;br /&gt;
  server=members.dyndns.org,             \&lt;br /&gt;
  protocol=dyndns2                       \&lt;br /&gt;
  gnutoo.homelinux.org&lt;br /&gt;
you can do your own copying the sample file to /usr/local/etc/:&lt;br /&gt;
 cp /usr/local/etc/ddclient.conf.sample /usr/local/etc/ddclient.conf&lt;br /&gt;
and then editing it...&lt;br /&gt;
&lt;br /&gt;
then we will need to execute the script when the internet comes up:&lt;br /&gt;
add this to /etc/rc.conf:&lt;br /&gt;
 ddclient_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
then if you get insternet via ppp,pppoe,pppoa: create the ppp.linkup file with the following content:&lt;br /&gt;
 alice:&lt;br /&gt;
  !bg /usr/local/etc/rc.d/ddclient restart&lt;br /&gt;
&amp;lt;i&amp;gt;change alice to match the provider you defined in /etc/ppp.conf&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''BE CAREFULL...you have to wait some time between the time the internet comes up and ddclient is restarted'''''&lt;br /&gt;
[[Category:FreeBSD for Servers]]&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/DynDns</id>
		<title>DynDns</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/DynDns"/>
				<updated>2008-06-12T22:48:54Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
DynDns is one of the free(as in no cost) Dynamic DNS provider.A Dynamic Dns is a service that permit you to have your own address name (such as rails.homelinux.org/) so you can offer services such as SSH or web server(http://rails.homelinux.org/)&amp;lt;!--i took the first website comming from google...change it if you want--&amp;gt; while having a Dynamic ip...&lt;br /&gt;
==The setup==&lt;br /&gt;
I tried:&lt;br /&gt;
*updatedd: updatedd-wrapper doesn't have a rc.d mode so you need to create it yourseld&lt;br /&gt;
*ipcheck : doesn't work for me because it doesn't find my ip on my userspace pppoe interface(tun0)&lt;br /&gt;
*ddclient: comes with a rc.d script...that's the good one&lt;br /&gt;
It would be nice if the ppp daemon could call script when the ip changes...but as i don't know how to do it we will use the daemon mode of ddclient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
run this command in order to install ddclient:&lt;br /&gt;
 cd /usr/ports/dns/ddclient &amp;amp;&amp;amp; make config &amp;amp;&amp;amp; make install&lt;br /&gt;
then you need to configure it:&lt;br /&gt;
here's my config file:&lt;br /&gt;
 login=GNUtoo					# default login&lt;br /&gt;
 password=mypassword				# default password&lt;br /&gt;
 #mx=mx.for.your.host				# default MX&lt;br /&gt;
 #backupmx=yes|no				# host is primary MX?&lt;br /&gt;
 #wildcard=yes|no				# add wildcard CNAME?&lt;br /&gt;
  custom=yes,                            \&lt;br /&gt;
  server=members.dyndns.org,             \&lt;br /&gt;
  protocol=dyndns2                       \&lt;br /&gt;
  gnutoo.homelinux.org&lt;br /&gt;
you can do your own copying the sample file to /usr/local/etc/:&lt;br /&gt;
 cp /usr/local/etc/ddclient.conf.sample /usr/local/etc/ddclient.conf&lt;br /&gt;
and then editing it...&lt;br /&gt;
&lt;br /&gt;
then we will need to execute the script when the internet comes up:&lt;br /&gt;
add this to /etc/rc.conf:&lt;br /&gt;
 ddclient_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
then if you get insternet via ppp,pppoe,pppoa: create the ppp.linkup file with the following content:&lt;br /&gt;
 alice:&lt;br /&gt;
  !bg /usr/local/etc/rc.d/ddclient restart&lt;br /&gt;
&amp;lt;i&amp;gt;change alice to match the provider you defined in /etc/ppp.conf&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''BE CAREFULL...you have to wait some time between the time the internet comes up and ddclient is restarted'''''&lt;br /&gt;
[[Category:FreeBSD for Servers]]&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/DynDns</id>
		<title>DynDns</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/DynDns"/>
				<updated>2008-06-12T22:48:23Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
DynDns is one of the free(as in no cost) Dynamic DNS provider.A Dynamic Dns is a service that permit you to have your own address name (such as rails.homelinux.org/) so you can offer services such as SSH or web server(http://rails.homelinux.org/)&amp;lt;!--i took the first website comming from google...change it if you want--&amp;gt; while having a Dynamic ip...&lt;br /&gt;
==The setup==&lt;br /&gt;
I tried:&lt;br /&gt;
*updatedd: updatedd-wrapper doesn't have a rc.d mode so you need to create it yourseld&lt;br /&gt;
*ipcheck : doesn't work for me because it doesn't find my ip on my userspace pppoe interface(tun0)&lt;br /&gt;
*ddclient: comes with a rc.d script...that's the good one&lt;br /&gt;
It would be nice if the ppp daemon could call script when the ip changes...but as i don't know how to do it we will use the daemon mode of ddclient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
run this command in order to install ddclient:&lt;br /&gt;
 cd /usr/ports/dns/ddclient &amp;amp;&amp;amp; make config &amp;amp;&amp;amp; make install&lt;br /&gt;
then you need to configure it:&lt;br /&gt;
here's my config file:&lt;br /&gt;
 login=GNUtoo					# default login&lt;br /&gt;
 password=mypassword				# default password&lt;br /&gt;
 #mx=mx.for.your.host				# default MX&lt;br /&gt;
 #backupmx=yes|no				# host is primary MX?&lt;br /&gt;
 #wildcard=yes|no				# add wildcard CNAME?&lt;br /&gt;
  custom=yes,                            \&lt;br /&gt;
  server=members.dyndns.org,             \&lt;br /&gt;
  protocol=dyndns2                       \&lt;br /&gt;
  gnutoo.homelinux.org&lt;br /&gt;
you can do your own copying the sample file to /usr/local/etc/:&lt;br /&gt;
 cp /usr/local/etc/ddclient.conf.sample /usr/local/etc/ddclient.conf&lt;br /&gt;
and then editing it...&lt;br /&gt;
&lt;br /&gt;
then we will need to execute the script when the internet comes up:&lt;br /&gt;
add this to /etc/rc.conf:&lt;br /&gt;
 ddclient_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
then if you get insternet via ppp,pppoe,pppoa: create the ppp.linkup file with the following content:&lt;br /&gt;
 alice:&lt;br /&gt;
  !bg /usr/local/etc/rc.d/ddclient restart&lt;br /&gt;
&amp;lt;i&amp;gt;change alice to match the provider you defined in /etc/ppp.conf&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''BE CAREFULL...you have to wait some time between the internet comes and ddclient is restarted'''''&lt;br /&gt;
[[Category:FreeBSD for Servers]]&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/DynDns</id>
		<title>DynDns</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/DynDns"/>
				<updated>2008-06-12T22:44:41Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
DynDns is one of the free(as in no cost) Dynamic DNS provider.A Dynamic Dns is a service that permit you to have your own address name (such as rails.homelinux.org/) so you can offer services such as SSH or web server(http://rails.homelinux.org/)&amp;lt;!--i took the first website comming from google...change it if you want--&amp;gt; while having a Dynamic ip...&lt;br /&gt;
==The setup==&lt;br /&gt;
I tried:&lt;br /&gt;
*updatedd: updatedd-wrapper doesn't have a rc.d mode so you need to create it yourseld&lt;br /&gt;
*ipcheck : doesn't work for me because it doesn't find my ip on my userspace pppoe interface(tun0)&lt;br /&gt;
*ddclient: comes with a rc.d script...that's the good one&lt;br /&gt;
It would be nice if the ppp daemon could call script when the ip changes...but as i don't know how to do it we will use the daemon mode of ddclient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
run this command in order to install ddclient:&lt;br /&gt;
 cd /usr/ports/dns/ddclient &amp;amp;&amp;amp; make config &amp;amp;&amp;amp; make install&lt;br /&gt;
then you need to configure it:&lt;br /&gt;
here's my config file:&lt;br /&gt;
 login=GNUtoo					# default login&lt;br /&gt;
 password=mypassword				# default password&lt;br /&gt;
 #mx=mx.for.your.host				# default MX&lt;br /&gt;
 #backupmx=yes|no				# host is primary MX?&lt;br /&gt;
 #wildcard=yes|no				# add wildcard CNAME?&lt;br /&gt;
  custom=yes,                            \&lt;br /&gt;
  server=members.dyndns.org,             \&lt;br /&gt;
  protocol=dyndns2                       \&lt;br /&gt;
  gnutoo.homelinux.org&lt;br /&gt;
you can do your own copying the sample file to /usr/local/etc/:&lt;br /&gt;
 cp /usr/local/etc/ddclient.conf.sample /usr/local/etc/ddclient.conf&lt;br /&gt;
and then editing it...&lt;br /&gt;
&lt;br /&gt;
then we will need to execute the script when the internet comes up:&lt;br /&gt;
add this to /etc/rc.conf:&lt;br /&gt;
 ddclient_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
then if you get insternet via ppp,pppoe,pppoa: create the ppp.linkup file with the following content:&lt;br /&gt;
 alice:&lt;br /&gt;
  !bg /usr/local/etc/rc.d/ddclient restart&lt;br /&gt;
&amp;lt;i&amp;gt;change alice to match the provider you defined in /etc/ppp.conf&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD for Servers]]&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/DynDns</id>
		<title>DynDns</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/DynDns"/>
				<updated>2008-06-12T22:40:35Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
DynDns is one of the free(as in no cost) Dynamic DNS provider.A Dynamic Dns is a service that permit you to have your own address name (such as rails.homelinux.org/) so you can offer services such as SSH or web server(http://rails.homelinux.org/) &lt;br /&gt;
&amp;lt;!--i took the first website comming from google...change it if you want--&amp;gt; while having a Dynamic ip...&lt;br /&gt;
==The setup==&lt;br /&gt;
I tried:&lt;br /&gt;
*updatedd: updatedd-wrapper doesn't have a rc.d mode so you need to create it yourseld&lt;br /&gt;
*ipcheck : doesn't work for me because it doesn't find my ip on my userspace pppoe interface(tun0)&lt;br /&gt;
*ddclient: comes with a rc.d script...that's the good one&lt;br /&gt;
It would be nice if the ppp daemon could call script when the ip changes...but as i don't know how to do it we will use the daemon mode of ddclient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
run this command in order to install ddclient:&lt;br /&gt;
 cd /usr/ports/dns/ddclient &amp;amp;&amp;amp; make config &amp;amp;&amp;amp; make install&lt;br /&gt;
then you need to configure it:&lt;br /&gt;
here's my config file:&lt;br /&gt;
 login=GNUtoo					# default login&lt;br /&gt;
 password=mypassword				# default password&lt;br /&gt;
 #mx=mx.for.your.host				# default MX&lt;br /&gt;
 #backupmx=yes|no				# host is primary MX?&lt;br /&gt;
 #wildcard=yes|no				# add wildcard CNAME?&lt;br /&gt;
  custom=yes,                            \&lt;br /&gt;
  server=members.dyndns.org,             \&lt;br /&gt;
  protocol=dyndns2                       \&lt;br /&gt;
  gnutoo.homelinux.org&lt;br /&gt;
you can do your own copying the sample file to /usr/local/etc/:&lt;br /&gt;
 cp /usr/local/etc/ddclient.conf.sample /usr/local/etc/ddclient.conf&lt;br /&gt;
and then editing it...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD for Servers]]&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/PPPOE,_access_point</id>
		<title>PPPOE, access point</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/PPPOE,_access_point"/>
				<updated>2008-06-04T22:08:04Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* Nat */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Some internet services provider such as alice in italy have a box(alice gate) that does everything(such as router and access point)...unfortunately we want to offer services to the internet such as:&lt;br /&gt;
*ssh&lt;br /&gt;
*web server &lt;br /&gt;
*port redirection for various applications such as games server(such as wormux that needs an open port in order to serve),or p2p&lt;br /&gt;
Fortunately the alice gate let us connect directly to the internet: see [http://wiki.openwrt.org/Alice here] for how to deactivate the router functions and so be connected directly to the internet...&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used the same hardware as in [[AccessPoint]] that is to say:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;br /&gt;
== Installation and Configuration==&lt;br /&gt;
* Install FreeBSD as usual.  This example uses FreeBSD 7.0.&lt;br /&gt;
* Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;sshd_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
===PPPOE===&lt;br /&gt;
This part can be difficult but we need internet working before following the installation&amp;lt;br&amp;gt;&lt;br /&gt;
here's my configuration file:&lt;br /&gt;
 default:&lt;br /&gt;
  set log Phase Chat LCP IPCP CCP tun command&lt;br /&gt;
  ident user-ppp VERSION (built COMPILATIONDATE)  &lt;br /&gt;
  &lt;br /&gt;
  # Ensure that &amp;quot;device&amp;quot; references the correct serial port&lt;br /&gt;
  # for your modem. (cuaa0 = COM1, cuaa1 = COM2)&lt;br /&gt;
  #&lt;br /&gt;
  set device /dev/cuaa1 &lt;br /&gt;
 &lt;br /&gt;
  set speed 115200&lt;br /&gt;
  set dial &amp;quot;ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \&lt;br /&gt;
            \&amp;quot;\&amp;quot; AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT&amp;quot;&lt;br /&gt;
  set timeout 180                        # 3 minute idle timer (the default)&lt;br /&gt;
  enable dns                             # request DNS info (for resolv.conf) &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 alice:&lt;br /&gt;
  disable ipv6cp&lt;br /&gt;
  add default HISADDR&lt;br /&gt;
  set device PPPoE:rl1&lt;br /&gt;
  set log Phase tun command&lt;br /&gt;
  set ifaddr 10.0.0.1/0 10.0.0.2/0&lt;br /&gt;
  set MRU 1490&lt;br /&gt;
  set MTU 1490&lt;br /&gt;
  # set log Phase tun command&lt;br /&gt;
  set authname username@alice.it&lt;br /&gt;
  set authkey password&lt;br /&gt;
  set dial&lt;br /&gt;
  set login&lt;br /&gt;
  set cd 5&lt;br /&gt;
  set redial 0 0&lt;br /&gt;
  set lqrperiod 5&lt;br /&gt;
  enable dns&lt;br /&gt;
  enable tcpmssfixup&lt;br /&gt;
  enable lqr&lt;br /&gt;
  #nat enable yes&lt;br /&gt;
  #nat use_sockets yes&lt;br /&gt;
  #nat unregistered_only yes&lt;br /&gt;
note the space at the beginning of the lines,&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;here you must change the interface that is rl1 in this line:&amp;lt;/i&amp;gt;&lt;br /&gt;
 set device PPPoE:rl1&lt;br /&gt;
i disabled ipv6 because it is not needed and messages error were comming in my logs about it,here's the line:&lt;br /&gt;
 disable ipv6cp&lt;br /&gt;
that is realy the lines that are in my configuration: that's because of my provider(alice from italy)...&lt;br /&gt;
 set authname username@alice.it&lt;br /&gt;
 set authkey password&lt;br /&gt;
you can also optionally change the name alice in this line:&lt;br /&gt;
 alice:&lt;br /&gt;
&lt;br /&gt;
if you do not have it add theses 2 line in /etc/syslog.conf:&lt;br /&gt;
 !ppp&lt;br /&gt;
 *.*                                             /var/log/ppp.log&lt;br /&gt;
that would permit you to see your log in a separate file that are in /var/log/ppp.log and /var/log/ppp.log.0.bz2(it get created when ppp.log is full, you can see it with bzcat)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
then we will run pppd:&lt;br /&gt;
 pppd -ddial -nat alice&lt;br /&gt;
it will create a log file in /var/log/ppp.log&amp;lt;br&amp;gt;&lt;br /&gt;
we will explain what nat means later&lt;br /&gt;
you should look at it and when it has finished to write things to it you can look if you get an ip on your tun interface:&lt;br /&gt;
 ifconfig tun0&lt;br /&gt;
&amp;lt;i&amp;gt;if you had already some tun interfaces before it will create a new one so change the interface name to the last created interface&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Then if you have an ip you can try to ping some well known ip(we will use FreeBSD's website ip):&lt;br /&gt;
 ping 69.147.83.33:&lt;br /&gt;
if it works you can try to ping a website by its name:&lt;br /&gt;
 ping www.FreeBSD.org&lt;br /&gt;
If you are here it means that the internet works...&lt;br /&gt;
&lt;br /&gt;
in case you need to stop the internet you can do the following:&lt;br /&gt;
ifconfig tun0 will gives you something like this:&lt;br /&gt;
 tun0: flags=8051&amp;lt;UP,POINTOPOINT,RUNNING,MULTICAST&amp;gt; metric 0 mtu 1492&lt;br /&gt;
 	inet 79.31.183.27 --&amp;gt; 192.168.100.1 netmask 0xffffffff &lt;br /&gt;
 	Opened by PID 438&lt;br /&gt;
notice the line &amp;lt;i&amp;gt;Opened by PID 438&amp;lt;/i&amp;gt; here 438 is the PID of the ppp process...just kill it:&lt;br /&gt;
 kill 438&lt;br /&gt;
&amp;lt;i&amp;gt;remplace 438 by the pid you found doing ifconfig&amp;lt;/i&amp;gt;&lt;br /&gt;
Then we will need to destroy the tun0 interface:&lt;br /&gt;
 ifconfig tun0 destroy&lt;br /&gt;
&lt;br /&gt;
====Nat====&lt;br /&gt;
Then if you stoped your connection restart it,we need it in order to test the nat(that means network address translation...we need this in order to share our connection,see [http://en.wikipedia.org/wiki/Network_address_translation the wikipedia     article] if you are interrested)&lt;br /&gt;
&lt;br /&gt;
we need to bring up the other wired network interface or the wifi(not the one that you used for connecting to the pppoe modem) card and assign an ip to it,but we will use the wired card for simplicity&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;note that you need an [http://en.wikipedia.org/wiki/Ethernet_crossover_cable Ethernet crossover cable] if you connect directly to the FreeBSD machine&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on the FreeBSD AccessPoint assign an ip to the interface:&lt;br /&gt;
 ifconfig rl0 up&lt;br /&gt;
 ifconfig rl0 inet 192.168.1.1 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
on FreeBSD client do:&lt;br /&gt;
 ifconfig rl0 up&lt;br /&gt;
 ifconfig rl0 inet 192.168.1.2 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
or on GNU/Linux client do:&lt;br /&gt;
 ifconfig eth0 up&lt;br /&gt;
 ifconfig eth0 inet 192.168.1.2 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
then try to ping each other:&lt;br /&gt;
on the client do:&lt;br /&gt;
 ping 192.168.1.1&lt;br /&gt;
on the server do:&lt;br /&gt;
 ping 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
if you can ping each other add the route in the client:&lt;br /&gt;
on FreeBSD client or GNU/Linux client do the following:&lt;br /&gt;
 route add default gw 192.168.1.1&lt;br /&gt;
then try to ping FreeBSD's website's ip: &lt;br /&gt;
 ping 69.147.83.33&lt;br /&gt;
&lt;br /&gt;
if it works then add your dns to /etc/resolve.conf&lt;br /&gt;
on the server do:&lt;br /&gt;
 cat /etc/resolv.conf&lt;br /&gt;
then write down the 2 ips,then on the client edit /etc/resolv.conf and recreate the same resolv.conf as the server&lt;br /&gt;
&lt;br /&gt;
alternatively you can copy the following in your resolv.conf...theses are the ip of opendns...as a temporary solution because:&lt;br /&gt;
*opendns could be far from your location&lt;br /&gt;
*opendns remplace the google querries from firefox's addressbar by his own version of google&lt;br /&gt;
*see [http://en.wikipedia.org/wiki/Opendns wikipedia's entry on opendns] for more details&lt;br /&gt;
here's the file:&lt;br /&gt;
 nameserver 208.67.222.222&lt;br /&gt;
 nameserver 208.67.222.220&lt;br /&gt;
&lt;br /&gt;
then try to ping the internet...&lt;br /&gt;
&lt;br /&gt;
then you shurely want to enable ppoe at boot so add the following in your /etc/rc.conf:&lt;br /&gt;
 ipv6_enable=&amp;quot;NO&amp;quot;&lt;br /&gt;
 ppp_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 ppp_mode=&amp;quot;ddial&amp;quot;&lt;br /&gt;
 ppp_profile=&amp;quot;alice&amp;quot;&lt;br /&gt;
 ppp_nat=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Dnsmasq===&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/PPPOE,_access_point</id>
		<title>PPPOE, access point</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/PPPOE,_access_point"/>
				<updated>2008-06-04T22:05:58Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* Nat */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Some internet services provider such as alice in italy have a box(alice gate) that does everything(such as router and access point)...unfortunately we want to offer services to the internet such as:&lt;br /&gt;
*ssh&lt;br /&gt;
*web server &lt;br /&gt;
*port redirection for various applications such as games server(such as wormux that needs an open port in order to serve),or p2p&lt;br /&gt;
Fortunately the alice gate let us connect directly to the internet: see [http://wiki.openwrt.org/Alice here] for how to deactivate the router functions and so be connected directly to the internet...&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used the same hardware as in [[AccessPoint]] that is to say:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;br /&gt;
== Installation and Configuration==&lt;br /&gt;
* Install FreeBSD as usual.  This example uses FreeBSD 7.0.&lt;br /&gt;
* Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;sshd_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
===PPPOE===&lt;br /&gt;
This part can be difficult but we need internet working before following the installation&amp;lt;br&amp;gt;&lt;br /&gt;
here's my configuration file:&lt;br /&gt;
 default:&lt;br /&gt;
  set log Phase Chat LCP IPCP CCP tun command&lt;br /&gt;
  ident user-ppp VERSION (built COMPILATIONDATE)  &lt;br /&gt;
  &lt;br /&gt;
  # Ensure that &amp;quot;device&amp;quot; references the correct serial port&lt;br /&gt;
  # for your modem. (cuaa0 = COM1, cuaa1 = COM2)&lt;br /&gt;
  #&lt;br /&gt;
  set device /dev/cuaa1 &lt;br /&gt;
 &lt;br /&gt;
  set speed 115200&lt;br /&gt;
  set dial &amp;quot;ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \&lt;br /&gt;
            \&amp;quot;\&amp;quot; AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT&amp;quot;&lt;br /&gt;
  set timeout 180                        # 3 minute idle timer (the default)&lt;br /&gt;
  enable dns                             # request DNS info (for resolv.conf) &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 alice:&lt;br /&gt;
  disable ipv6cp&lt;br /&gt;
  add default HISADDR&lt;br /&gt;
  set device PPPoE:rl1&lt;br /&gt;
  set log Phase tun command&lt;br /&gt;
  set ifaddr 10.0.0.1/0 10.0.0.2/0&lt;br /&gt;
  set MRU 1490&lt;br /&gt;
  set MTU 1490&lt;br /&gt;
  # set log Phase tun command&lt;br /&gt;
  set authname username@alice.it&lt;br /&gt;
  set authkey password&lt;br /&gt;
  set dial&lt;br /&gt;
  set login&lt;br /&gt;
  set cd 5&lt;br /&gt;
  set redial 0 0&lt;br /&gt;
  set lqrperiod 5&lt;br /&gt;
  enable dns&lt;br /&gt;
  enable tcpmssfixup&lt;br /&gt;
  enable lqr&lt;br /&gt;
  #nat enable yes&lt;br /&gt;
  #nat use_sockets yes&lt;br /&gt;
  #nat unregistered_only yes&lt;br /&gt;
note the space at the beginning of the lines,&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;here you must change the interface that is rl1 in this line:&amp;lt;/i&amp;gt;&lt;br /&gt;
 set device PPPoE:rl1&lt;br /&gt;
i disabled ipv6 because it is not needed and messages error were comming in my logs about it,here's the line:&lt;br /&gt;
 disable ipv6cp&lt;br /&gt;
that is realy the lines that are in my configuration: that's because of my provider(alice from italy)...&lt;br /&gt;
 set authname username@alice.it&lt;br /&gt;
 set authkey password&lt;br /&gt;
you can also optionally change the name alice in this line:&lt;br /&gt;
 alice:&lt;br /&gt;
&lt;br /&gt;
if you do not have it add theses 2 line in /etc/syslog.conf:&lt;br /&gt;
 !ppp&lt;br /&gt;
 *.*                                             /var/log/ppp.log&lt;br /&gt;
that would permit you to see your log in a separate file that are in /var/log/ppp.log and /var/log/ppp.log.0.bz2(it get created when ppp.log is full, you can see it with bzcat)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
then we will run pppd:&lt;br /&gt;
 pppd -ddial -nat alice&lt;br /&gt;
it will create a log file in /var/log/ppp.log&amp;lt;br&amp;gt;&lt;br /&gt;
we will explain what nat means later&lt;br /&gt;
you should look at it and when it has finished to write things to it you can look if you get an ip on your tun interface:&lt;br /&gt;
 ifconfig tun0&lt;br /&gt;
&amp;lt;i&amp;gt;if you had already some tun interfaces before it will create a new one so change the interface name to the last created interface&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Then if you have an ip you can try to ping some well known ip(we will use FreeBSD's website ip):&lt;br /&gt;
 ping 69.147.83.33:&lt;br /&gt;
if it works you can try to ping a website by its name:&lt;br /&gt;
 ping www.FreeBSD.org&lt;br /&gt;
If you are here it means that the internet works...&lt;br /&gt;
&lt;br /&gt;
in case you need to stop the internet you can do the following:&lt;br /&gt;
ifconfig tun0 will gives you something like this:&lt;br /&gt;
 tun0: flags=8051&amp;lt;UP,POINTOPOINT,RUNNING,MULTICAST&amp;gt; metric 0 mtu 1492&lt;br /&gt;
 	inet 79.31.183.27 --&amp;gt; 192.168.100.1 netmask 0xffffffff &lt;br /&gt;
 	Opened by PID 438&lt;br /&gt;
notice the line &amp;lt;i&amp;gt;Opened by PID 438&amp;lt;/i&amp;gt; here 438 is the PID of the ppp process...just kill it:&lt;br /&gt;
 kill 438&lt;br /&gt;
&amp;lt;i&amp;gt;remplace 438 by the pid you found doing ifconfig&amp;lt;/i&amp;gt;&lt;br /&gt;
Then we will need to destroy the tun0 interface:&lt;br /&gt;
 ifconfig tun0 destroy&lt;br /&gt;
&lt;br /&gt;
====Nat====&lt;br /&gt;
Then if you stoped your connection restart it,we need it in order to test the nat(that means network address translation...we need this in order to share our connection,see [http://en.wikipedia.org/wiki/Network_address_translation the wikipedia     article] if you are interrested)&lt;br /&gt;
&lt;br /&gt;
we need to bring up the other wired network interface or the wifi(not the one that you used for connecting to the pppoe modem) card and assign an ip to it,but we will use the wired card for simplicity&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;note that you need an [http://en.wikipedia.org/wiki/Ethernet_crossover_cable Ethernet crossover cable] if you connect directly to the FreeBSD machine&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on the FreeBSD AccessPoint assign an ip to the interface:&lt;br /&gt;
 ifconfig rl0 up&lt;br /&gt;
 ifconfig rl0 inet 192.168.1.1 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
on FreeBSD client do:&lt;br /&gt;
 ifconfig rl0 up&lt;br /&gt;
 ifconfig rl0 inet 192.168.1.2 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
or on GNU/Linux client do:&lt;br /&gt;
 ifconfig eth0 up&lt;br /&gt;
 ifconfig eth0 inet 192.168.1.2 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
then try to ping each other:&lt;br /&gt;
on the client do:&lt;br /&gt;
 ping 192.168.1.1&lt;br /&gt;
on the server do:&lt;br /&gt;
 ping 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
if you can ping each other add the route in the client:&lt;br /&gt;
on FreeBSD client or GNU/Linux client do the following:&lt;br /&gt;
 route add default gw 192.168.1.1&lt;br /&gt;
then try to ping FreeBSD's website's ip: &lt;br /&gt;
 ping 69.147.83.33&lt;br /&gt;
&lt;br /&gt;
if it works then add your dns to /etc/resolve.conf&lt;br /&gt;
on the server do:&lt;br /&gt;
 cat /etc/resolv.conf&lt;br /&gt;
then write down the 2 ips,then on the client edit /etc/resolv.conf and recreate the same resolv.conf as the server&lt;br /&gt;
&lt;br /&gt;
alternatively you can copy the following in your resolv.conf...theses are the ip of opendns...as a temporary solution because:&lt;br /&gt;
*opendns could be far from your location&lt;br /&gt;
*opendns remplace the google querries from firefox's addressbar by his own version of google&lt;br /&gt;
*see [http://en.wikipedia.org/wiki/Opendns wikipedia's entry on opendns] for more details&lt;br /&gt;
here's the file:&lt;br /&gt;
 nameserver 208.67.222.222&lt;br /&gt;
 nameserver 208.67.222.220&lt;br /&gt;
&lt;br /&gt;
then try to ping the internet...&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/PPPOE,_access_point</id>
		<title>PPPOE, access point</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/PPPOE,_access_point"/>
				<updated>2008-06-04T22:05:40Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* Nat */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Some internet services provider such as alice in italy have a box(alice gate) that does everything(such as router and access point)...unfortunately we want to offer services to the internet such as:&lt;br /&gt;
*ssh&lt;br /&gt;
*web server &lt;br /&gt;
*port redirection for various applications such as games server(such as wormux that needs an open port in order to serve),or p2p&lt;br /&gt;
Fortunately the alice gate let us connect directly to the internet: see [http://wiki.openwrt.org/Alice here] for how to deactivate the router functions and so be connected directly to the internet...&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used the same hardware as in [[AccessPoint]] that is to say:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;br /&gt;
== Installation and Configuration==&lt;br /&gt;
* Install FreeBSD as usual.  This example uses FreeBSD 7.0.&lt;br /&gt;
* Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;sshd_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
===PPPOE===&lt;br /&gt;
This part can be difficult but we need internet working before following the installation&amp;lt;br&amp;gt;&lt;br /&gt;
here's my configuration file:&lt;br /&gt;
 default:&lt;br /&gt;
  set log Phase Chat LCP IPCP CCP tun command&lt;br /&gt;
  ident user-ppp VERSION (built COMPILATIONDATE)  &lt;br /&gt;
  &lt;br /&gt;
  # Ensure that &amp;quot;device&amp;quot; references the correct serial port&lt;br /&gt;
  # for your modem. (cuaa0 = COM1, cuaa1 = COM2)&lt;br /&gt;
  #&lt;br /&gt;
  set device /dev/cuaa1 &lt;br /&gt;
 &lt;br /&gt;
  set speed 115200&lt;br /&gt;
  set dial &amp;quot;ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \&lt;br /&gt;
            \&amp;quot;\&amp;quot; AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT&amp;quot;&lt;br /&gt;
  set timeout 180                        # 3 minute idle timer (the default)&lt;br /&gt;
  enable dns                             # request DNS info (for resolv.conf) &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 alice:&lt;br /&gt;
  disable ipv6cp&lt;br /&gt;
  add default HISADDR&lt;br /&gt;
  set device PPPoE:rl1&lt;br /&gt;
  set log Phase tun command&lt;br /&gt;
  set ifaddr 10.0.0.1/0 10.0.0.2/0&lt;br /&gt;
  set MRU 1490&lt;br /&gt;
  set MTU 1490&lt;br /&gt;
  # set log Phase tun command&lt;br /&gt;
  set authname username@alice.it&lt;br /&gt;
  set authkey password&lt;br /&gt;
  set dial&lt;br /&gt;
  set login&lt;br /&gt;
  set cd 5&lt;br /&gt;
  set redial 0 0&lt;br /&gt;
  set lqrperiod 5&lt;br /&gt;
  enable dns&lt;br /&gt;
  enable tcpmssfixup&lt;br /&gt;
  enable lqr&lt;br /&gt;
  #nat enable yes&lt;br /&gt;
  #nat use_sockets yes&lt;br /&gt;
  #nat unregistered_only yes&lt;br /&gt;
note the space at the beginning of the lines,&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;here you must change the interface that is rl1 in this line:&amp;lt;/i&amp;gt;&lt;br /&gt;
 set device PPPoE:rl1&lt;br /&gt;
i disabled ipv6 because it is not needed and messages error were comming in my logs about it,here's the line:&lt;br /&gt;
 disable ipv6cp&lt;br /&gt;
that is realy the lines that are in my configuration: that's because of my provider(alice from italy)...&lt;br /&gt;
 set authname username@alice.it&lt;br /&gt;
 set authkey password&lt;br /&gt;
you can also optionally change the name alice in this line:&lt;br /&gt;
 alice:&lt;br /&gt;
&lt;br /&gt;
if you do not have it add theses 2 line in /etc/syslog.conf:&lt;br /&gt;
 !ppp&lt;br /&gt;
 *.*                                             /var/log/ppp.log&lt;br /&gt;
that would permit you to see your log in a separate file that are in /var/log/ppp.log and /var/log/ppp.log.0.bz2(it get created when ppp.log is full, you can see it with bzcat)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
then we will run pppd:&lt;br /&gt;
 pppd -ddial -nat alice&lt;br /&gt;
it will create a log file in /var/log/ppp.log&amp;lt;br&amp;gt;&lt;br /&gt;
we will explain what nat means later&lt;br /&gt;
you should look at it and when it has finished to write things to it you can look if you get an ip on your tun interface:&lt;br /&gt;
 ifconfig tun0&lt;br /&gt;
&amp;lt;i&amp;gt;if you had already some tun interfaces before it will create a new one so change the interface name to the last created interface&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Then if you have an ip you can try to ping some well known ip(we will use FreeBSD's website ip):&lt;br /&gt;
 ping 69.147.83.33:&lt;br /&gt;
if it works you can try to ping a website by its name:&lt;br /&gt;
 ping www.FreeBSD.org&lt;br /&gt;
If you are here it means that the internet works...&lt;br /&gt;
&lt;br /&gt;
in case you need to stop the internet you can do the following:&lt;br /&gt;
ifconfig tun0 will gives you something like this:&lt;br /&gt;
 tun0: flags=8051&amp;lt;UP,POINTOPOINT,RUNNING,MULTICAST&amp;gt; metric 0 mtu 1492&lt;br /&gt;
 	inet 79.31.183.27 --&amp;gt; 192.168.100.1 netmask 0xffffffff &lt;br /&gt;
 	Opened by PID 438&lt;br /&gt;
notice the line &amp;lt;i&amp;gt;Opened by PID 438&amp;lt;/i&amp;gt; here 438 is the PID of the ppp process...just kill it:&lt;br /&gt;
 kill 438&lt;br /&gt;
&amp;lt;i&amp;gt;remplace 438 by the pid you found doing ifconfig&amp;lt;/i&amp;gt;&lt;br /&gt;
Then we will need to destroy the tun0 interface:&lt;br /&gt;
 ifconfig tun0 destroy&lt;br /&gt;
&lt;br /&gt;
====Nat====&lt;br /&gt;
Then if you stoped your connection restart it,we need it in order to test the nat(that means network address translation...we need this in order to share our connection,see [http://en.wikipedia.org/wiki/Network_address_translation the wikipedia     article] if you are interrested)&lt;br /&gt;
&lt;br /&gt;
we need to bring up the other wired network interface or the wifi(not the one that you used for connecting to the pppoe modem) card and assign an ip to it,but we will use the wired card for simplicity&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;note that you need an [http://en.wikipedia.org/wiki/Ethernet_crossover_cable Ethernet crossover cable] if you connect directly to the FreeBSD machine&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on the FreeBSD AccessPoint assign an ip to the interface:&lt;br /&gt;
 ifconfig rl0 up&lt;br /&gt;
 ifconfig rl0 inet 192.168.1.1 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
on FreeBSD client do:&lt;br /&gt;
 ifconfig rl0 up&lt;br /&gt;
 ifconfig rl0 inet 192.168.1.2 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
or on GNU/Linux client do:&lt;br /&gt;
 ifconfig eth0 up&lt;br /&gt;
 ifconfig eth0 inet 192.168.1.2 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
then try to ping each other:&lt;br /&gt;
on the client do:&lt;br /&gt;
 ping 192.168.1.1&lt;br /&gt;
on the server do:&lt;br /&gt;
 ping 192.168.1.2&lt;br /&gt;
&lt;br /&gt;
if you can ping each other add the route in the client:&lt;br /&gt;
on FreeBSD client or GNU/Linux client do the following:&lt;br /&gt;
 route add default gw 192.168.1.1&lt;br /&gt;
then try to ping FreeBSD's website's ip: &lt;br /&gt;
 ping 69.147.83.33&lt;br /&gt;
&lt;br /&gt;
if it works then add your dns to /etc/resolve.conf&lt;br /&gt;
on the server do:&lt;br /&gt;
 cat /etc/resolv.conf&lt;br /&gt;
then write down the 2 ips,then on the client edit /etc/resolv.conf and recreate the same resolv.conf as the server&lt;br /&gt;
&lt;br /&gt;
alternatively you can copy the following in your resolv.conf...theses are the ip of opendns...as a temporary solution because:&lt;br /&gt;
*opendns could be far from your location&lt;br /&gt;
*opendns remplace the google querries from firefox's addressbar by his own version of google&lt;br /&gt;
*see [http://en.wikipedia.org/wiki/Opendns wikipedia's entry on opendns] for more details&lt;br /&gt;
here's the file:&lt;br /&gt;
 nameserver 208.67.222.222&lt;br /&gt;
 nameserver 208.67.222.220&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/PPPOE,_access_point</id>
		<title>PPPOE, access point</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/PPPOE,_access_point"/>
				<updated>2008-06-04T21:56:59Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* Nat */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Some internet services provider such as alice in italy have a box(alice gate) that does everything(such as router and access point)...unfortunately we want to offer services to the internet such as:&lt;br /&gt;
*ssh&lt;br /&gt;
*web server &lt;br /&gt;
*port redirection for various applications such as games server(such as wormux that needs an open port in order to serve),or p2p&lt;br /&gt;
Fortunately the alice gate let us connect directly to the internet: see [http://wiki.openwrt.org/Alice here] for how to deactivate the router functions and so be connected directly to the internet...&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used the same hardware as in [[AccessPoint]] that is to say:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;br /&gt;
== Installation and Configuration==&lt;br /&gt;
* Install FreeBSD as usual.  This example uses FreeBSD 7.0.&lt;br /&gt;
* Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;sshd_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
===PPPOE===&lt;br /&gt;
This part can be difficult but we need internet working before following the installation&amp;lt;br&amp;gt;&lt;br /&gt;
here's my configuration file:&lt;br /&gt;
 default:&lt;br /&gt;
  set log Phase Chat LCP IPCP CCP tun command&lt;br /&gt;
  ident user-ppp VERSION (built COMPILATIONDATE)  &lt;br /&gt;
  &lt;br /&gt;
  # Ensure that &amp;quot;device&amp;quot; references the correct serial port&lt;br /&gt;
  # for your modem. (cuaa0 = COM1, cuaa1 = COM2)&lt;br /&gt;
  #&lt;br /&gt;
  set device /dev/cuaa1 &lt;br /&gt;
 &lt;br /&gt;
  set speed 115200&lt;br /&gt;
  set dial &amp;quot;ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \&lt;br /&gt;
            \&amp;quot;\&amp;quot; AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT&amp;quot;&lt;br /&gt;
  set timeout 180                        # 3 minute idle timer (the default)&lt;br /&gt;
  enable dns                             # request DNS info (for resolv.conf) &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 alice:&lt;br /&gt;
  disable ipv6cp&lt;br /&gt;
  add default HISADDR&lt;br /&gt;
  set device PPPoE:rl1&lt;br /&gt;
  set log Phase tun command&lt;br /&gt;
  set ifaddr 10.0.0.1/0 10.0.0.2/0&lt;br /&gt;
  set MRU 1490&lt;br /&gt;
  set MTU 1490&lt;br /&gt;
  # set log Phase tun command&lt;br /&gt;
  set authname username@alice.it&lt;br /&gt;
  set authkey password&lt;br /&gt;
  set dial&lt;br /&gt;
  set login&lt;br /&gt;
  set cd 5&lt;br /&gt;
  set redial 0 0&lt;br /&gt;
  set lqrperiod 5&lt;br /&gt;
  enable dns&lt;br /&gt;
  enable tcpmssfixup&lt;br /&gt;
  enable lqr&lt;br /&gt;
  #nat enable yes&lt;br /&gt;
  #nat use_sockets yes&lt;br /&gt;
  #nat unregistered_only yes&lt;br /&gt;
note the space at the beginning of the lines,&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;here you must change the interface that is rl1 in this line:&amp;lt;/i&amp;gt;&lt;br /&gt;
 set device PPPoE:rl1&lt;br /&gt;
i disabled ipv6 because it is not needed and messages error were comming in my logs about it,here's the line:&lt;br /&gt;
 disable ipv6cp&lt;br /&gt;
that is realy the lines that are in my configuration: that's because of my provider(alice from italy)...&lt;br /&gt;
 set authname username@alice.it&lt;br /&gt;
 set authkey password&lt;br /&gt;
you can also optionally change the name alice in this line:&lt;br /&gt;
 alice:&lt;br /&gt;
&lt;br /&gt;
if you do not have it add theses 2 line in /etc/syslog.conf:&lt;br /&gt;
 !ppp&lt;br /&gt;
 *.*                                             /var/log/ppp.log&lt;br /&gt;
that would permit you to see your log in a separate file that are in /var/log/ppp.log and /var/log/ppp.log.0.bz2(it get created when ppp.log is full, you can see it with bzcat)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
then we will run pppd:&lt;br /&gt;
 pppd -ddial -nat alice&lt;br /&gt;
it will create a log file in /var/log/ppp.log&amp;lt;br&amp;gt;&lt;br /&gt;
we will explain what nat means later&lt;br /&gt;
you should look at it and when it has finished to write things to it you can look if you get an ip on your tun interface:&lt;br /&gt;
 ifconfig tun0&lt;br /&gt;
&amp;lt;i&amp;gt;if you had already some tun interfaces before it will create a new one so change the interface name to the last created interface&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Then if you have an ip you can try to ping some well known ip(we will use FreeBSD's website ip):&lt;br /&gt;
 ping 69.147.83.33:&lt;br /&gt;
if it works you can try to ping a website by its name:&lt;br /&gt;
 ping www.FreeBSD.org&lt;br /&gt;
If you are here it means that the internet works...&lt;br /&gt;
&lt;br /&gt;
in case you need to stop the internet you can do the following:&lt;br /&gt;
ifconfig tun0 will gives you something like this:&lt;br /&gt;
 tun0: flags=8051&amp;lt;UP,POINTOPOINT,RUNNING,MULTICAST&amp;gt; metric 0 mtu 1492&lt;br /&gt;
 	inet 79.31.183.27 --&amp;gt; 192.168.100.1 netmask 0xffffffff &lt;br /&gt;
 	Opened by PID 438&lt;br /&gt;
notice the line &amp;lt;i&amp;gt;Opened by PID 438&amp;lt;/i&amp;gt; here 438 is the PID of the ppp process...just kill it:&lt;br /&gt;
 kill 438&lt;br /&gt;
&amp;lt;i&amp;gt;remplace 438 by the pid you found doing ifconfig&amp;lt;/i&amp;gt;&lt;br /&gt;
Then we will need to destroy the tun0 interface:&lt;br /&gt;
 ifconfig tun0 destroy&lt;br /&gt;
&lt;br /&gt;
====Nat====&lt;br /&gt;
Then if you stoped your connection restart it,we need it in order to test the nat(that means network address translation...we need this in order to share our connection,see [http://en.wikipedia.org/wiki/Network_address_translation the wikipedia     article] if you are interrested)&lt;br /&gt;
&lt;br /&gt;
we need to bring up the other wired network interface or the wifi(not the one that you used for connecting to the pppoe modem) card and assign an ip to it,but we will use the wired card for simplicity&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;note that you need an [http://en.wikipedia.org/wiki/Ethernet_crossover_cable Ethernet crossover cable] if you connect directly to the FreeBSD machine&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on the FreeBSD AccessPoint assign an ip to the interface:&lt;br /&gt;
 ifconfig rl0 up&lt;br /&gt;
 ifconfig rl0 inet 192.168.1.1 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
on FreeBSD client do:&lt;br /&gt;
 ifconfig rl0 up&lt;br /&gt;
 ifconfig rl0 inet 192.168.1.2 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
or on GNU/Linux client do:&lt;br /&gt;
 ifconfig eth0 up&lt;br /&gt;
 ifconfig eth0 inet 192.168.1.2 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
then try to ping each other:&lt;br /&gt;
on the client do:&lt;br /&gt;
 ping 192.168.1.1&lt;br /&gt;
on the server do:&lt;br /&gt;
 ping 192.168.1.2&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/PPPOE,_access_point</id>
		<title>PPPOE, access point</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/PPPOE,_access_point"/>
				<updated>2008-06-04T21:56:23Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* Nat */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Some internet services provider such as alice in italy have a box(alice gate) that does everything(such as router and access point)...unfortunately we want to offer services to the internet such as:&lt;br /&gt;
*ssh&lt;br /&gt;
*web server &lt;br /&gt;
*port redirection for various applications such as games server(such as wormux that needs an open port in order to serve),or p2p&lt;br /&gt;
Fortunately the alice gate let us connect directly to the internet: see [http://wiki.openwrt.org/Alice here] for how to deactivate the router functions and so be connected directly to the internet...&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used the same hardware as in [[AccessPoint]] that is to say:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;br /&gt;
== Installation and Configuration==&lt;br /&gt;
* Install FreeBSD as usual.  This example uses FreeBSD 7.0.&lt;br /&gt;
* Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;sshd_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
===PPPOE===&lt;br /&gt;
This part can be difficult but we need internet working before following the installation&amp;lt;br&amp;gt;&lt;br /&gt;
here's my configuration file:&lt;br /&gt;
 default:&lt;br /&gt;
  set log Phase Chat LCP IPCP CCP tun command&lt;br /&gt;
  ident user-ppp VERSION (built COMPILATIONDATE)  &lt;br /&gt;
  &lt;br /&gt;
  # Ensure that &amp;quot;device&amp;quot; references the correct serial port&lt;br /&gt;
  # for your modem. (cuaa0 = COM1, cuaa1 = COM2)&lt;br /&gt;
  #&lt;br /&gt;
  set device /dev/cuaa1 &lt;br /&gt;
 &lt;br /&gt;
  set speed 115200&lt;br /&gt;
  set dial &amp;quot;ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \&lt;br /&gt;
            \&amp;quot;\&amp;quot; AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT&amp;quot;&lt;br /&gt;
  set timeout 180                        # 3 minute idle timer (the default)&lt;br /&gt;
  enable dns                             # request DNS info (for resolv.conf) &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 alice:&lt;br /&gt;
  disable ipv6cp&lt;br /&gt;
  add default HISADDR&lt;br /&gt;
  set device PPPoE:rl1&lt;br /&gt;
  set log Phase tun command&lt;br /&gt;
  set ifaddr 10.0.0.1/0 10.0.0.2/0&lt;br /&gt;
  set MRU 1490&lt;br /&gt;
  set MTU 1490&lt;br /&gt;
  # set log Phase tun command&lt;br /&gt;
  set authname username@alice.it&lt;br /&gt;
  set authkey password&lt;br /&gt;
  set dial&lt;br /&gt;
  set login&lt;br /&gt;
  set cd 5&lt;br /&gt;
  set redial 0 0&lt;br /&gt;
  set lqrperiod 5&lt;br /&gt;
  enable dns&lt;br /&gt;
  enable tcpmssfixup&lt;br /&gt;
  enable lqr&lt;br /&gt;
  #nat enable yes&lt;br /&gt;
  #nat use_sockets yes&lt;br /&gt;
  #nat unregistered_only yes&lt;br /&gt;
note the space at the beginning of the lines,&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;here you must change the interface that is rl1 in this line:&amp;lt;/i&amp;gt;&lt;br /&gt;
 set device PPPoE:rl1&lt;br /&gt;
i disabled ipv6 because it is not needed and messages error were comming in my logs about it,here's the line:&lt;br /&gt;
 disable ipv6cp&lt;br /&gt;
that is realy the lines that are in my configuration: that's because of my provider(alice from italy)...&lt;br /&gt;
 set authname username@alice.it&lt;br /&gt;
 set authkey password&lt;br /&gt;
you can also optionally change the name alice in this line:&lt;br /&gt;
 alice:&lt;br /&gt;
&lt;br /&gt;
if you do not have it add theses 2 line in /etc/syslog.conf:&lt;br /&gt;
 !ppp&lt;br /&gt;
 *.*                                             /var/log/ppp.log&lt;br /&gt;
that would permit you to see your log in a separate file that are in /var/log/ppp.log and /var/log/ppp.log.0.bz2(it get created when ppp.log is full, you can see it with bzcat)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
then we will run pppd:&lt;br /&gt;
 pppd -ddial -nat alice&lt;br /&gt;
it will create a log file in /var/log/ppp.log&amp;lt;br&amp;gt;&lt;br /&gt;
we will explain what nat means later&lt;br /&gt;
you should look at it and when it has finished to write things to it you can look if you get an ip on your tun interface:&lt;br /&gt;
 ifconfig tun0&lt;br /&gt;
&amp;lt;i&amp;gt;if you had already some tun interfaces before it will create a new one so change the interface name to the last created interface&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Then if you have an ip you can try to ping some well known ip(we will use FreeBSD's website ip):&lt;br /&gt;
 ping 69.147.83.33:&lt;br /&gt;
if it works you can try to ping a website by its name:&lt;br /&gt;
 ping www.FreeBSD.org&lt;br /&gt;
If you are here it means that the internet works...&lt;br /&gt;
&lt;br /&gt;
in case you need to stop the internet you can do the following:&lt;br /&gt;
ifconfig tun0 will gives you something like this:&lt;br /&gt;
 tun0: flags=8051&amp;lt;UP,POINTOPOINT,RUNNING,MULTICAST&amp;gt; metric 0 mtu 1492&lt;br /&gt;
 	inet 79.31.183.27 --&amp;gt; 192.168.100.1 netmask 0xffffffff &lt;br /&gt;
 	Opened by PID 438&lt;br /&gt;
notice the line &amp;lt;i&amp;gt;Opened by PID 438&amp;lt;/i&amp;gt; here 438 is the PID of the ppp process...just kill it:&lt;br /&gt;
 kill 438&lt;br /&gt;
&amp;lt;i&amp;gt;remplace 438 by the pid you found doing ifconfig&amp;lt;/i&amp;gt;&lt;br /&gt;
Then we will need to destroy the tun0 interface:&lt;br /&gt;
 ifconfig tun0 destroy&lt;br /&gt;
&lt;br /&gt;
====Nat====&lt;br /&gt;
Then if you stoped your connection restart it,we need it in order to test the nat(that means network address translation...we need this in order to share our connection,see [http://en.wikipedia.org/wiki/Network_address_translation the wikipedia     article] if you are interrested)&lt;br /&gt;
&lt;br /&gt;
we need to bring up the other wired network interface or the wifi(not the one that you used for connecting to the pppoe modem) card and assign an ip to it,but we will use the wired card for simplicity&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;note that you need an [http://en.wikipedia.org/wiki/Ethernet_crossover_cable Ethernet crossover cable] if you connect directly to the FreeBSD machine&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on the FreeBSD AccessPoint assign an ip to the interface:&lt;br /&gt;
 ifconfig rl0 up&lt;br /&gt;
 ifconfig rl0 inet 192.168.1.1 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
on FreeBSD client do:&lt;br /&gt;
 ifconfig rl0 up&lt;br /&gt;
 ifconfig rl0 inet 192.168.1.2 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
or on GNU/Linux client do:&lt;br /&gt;
 ifconfig eth0 up&lt;br /&gt;
 ifconfig eth0 inet 192.168.1.2 netmask 255.255.255.0&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/PPPOE,_access_point</id>
		<title>PPPOE, access point</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/PPPOE,_access_point"/>
				<updated>2008-06-04T21:55:39Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* Nat */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Some internet services provider such as alice in italy have a box(alice gate) that does everything(such as router and access point)...unfortunately we want to offer services to the internet such as:&lt;br /&gt;
*ssh&lt;br /&gt;
*web server &lt;br /&gt;
*port redirection for various applications such as games server(such as wormux that needs an open port in order to serve),or p2p&lt;br /&gt;
Fortunately the alice gate let us connect directly to the internet: see [http://wiki.openwrt.org/Alice here] for how to deactivate the router functions and so be connected directly to the internet...&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used the same hardware as in [[AccessPoint]] that is to say:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;br /&gt;
== Installation and Configuration==&lt;br /&gt;
* Install FreeBSD as usual.  This example uses FreeBSD 7.0.&lt;br /&gt;
* Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;sshd_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
===PPPOE===&lt;br /&gt;
This part can be difficult but we need internet working before following the installation&amp;lt;br&amp;gt;&lt;br /&gt;
here's my configuration file:&lt;br /&gt;
 default:&lt;br /&gt;
  set log Phase Chat LCP IPCP CCP tun command&lt;br /&gt;
  ident user-ppp VERSION (built COMPILATIONDATE)  &lt;br /&gt;
  &lt;br /&gt;
  # Ensure that &amp;quot;device&amp;quot; references the correct serial port&lt;br /&gt;
  # for your modem. (cuaa0 = COM1, cuaa1 = COM2)&lt;br /&gt;
  #&lt;br /&gt;
  set device /dev/cuaa1 &lt;br /&gt;
 &lt;br /&gt;
  set speed 115200&lt;br /&gt;
  set dial &amp;quot;ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \&lt;br /&gt;
            \&amp;quot;\&amp;quot; AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT&amp;quot;&lt;br /&gt;
  set timeout 180                        # 3 minute idle timer (the default)&lt;br /&gt;
  enable dns                             # request DNS info (for resolv.conf) &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 alice:&lt;br /&gt;
  disable ipv6cp&lt;br /&gt;
  add default HISADDR&lt;br /&gt;
  set device PPPoE:rl1&lt;br /&gt;
  set log Phase tun command&lt;br /&gt;
  set ifaddr 10.0.0.1/0 10.0.0.2/0&lt;br /&gt;
  set MRU 1490&lt;br /&gt;
  set MTU 1490&lt;br /&gt;
  # set log Phase tun command&lt;br /&gt;
  set authname username@alice.it&lt;br /&gt;
  set authkey password&lt;br /&gt;
  set dial&lt;br /&gt;
  set login&lt;br /&gt;
  set cd 5&lt;br /&gt;
  set redial 0 0&lt;br /&gt;
  set lqrperiod 5&lt;br /&gt;
  enable dns&lt;br /&gt;
  enable tcpmssfixup&lt;br /&gt;
  enable lqr&lt;br /&gt;
  #nat enable yes&lt;br /&gt;
  #nat use_sockets yes&lt;br /&gt;
  #nat unregistered_only yes&lt;br /&gt;
note the space at the beginning of the lines,&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;here you must change the interface that is rl1 in this line:&amp;lt;/i&amp;gt;&lt;br /&gt;
 set device PPPoE:rl1&lt;br /&gt;
i disabled ipv6 because it is not needed and messages error were comming in my logs about it,here's the line:&lt;br /&gt;
 disable ipv6cp&lt;br /&gt;
that is realy the lines that are in my configuration: that's because of my provider(alice from italy)...&lt;br /&gt;
 set authname username@alice.it&lt;br /&gt;
 set authkey password&lt;br /&gt;
you can also optionally change the name alice in this line:&lt;br /&gt;
 alice:&lt;br /&gt;
&lt;br /&gt;
if you do not have it add theses 2 line in /etc/syslog.conf:&lt;br /&gt;
 !ppp&lt;br /&gt;
 *.*                                             /var/log/ppp.log&lt;br /&gt;
that would permit you to see your log in a separate file that are in /var/log/ppp.log and /var/log/ppp.log.0.bz2(it get created when ppp.log is full, you can see it with bzcat)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
then we will run pppd:&lt;br /&gt;
 pppd -ddial -nat alice&lt;br /&gt;
it will create a log file in /var/log/ppp.log&amp;lt;br&amp;gt;&lt;br /&gt;
we will explain what nat means later&lt;br /&gt;
you should look at it and when it has finished to write things to it you can look if you get an ip on your tun interface:&lt;br /&gt;
 ifconfig tun0&lt;br /&gt;
&amp;lt;i&amp;gt;if you had already some tun interfaces before it will create a new one so change the interface name to the last created interface&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Then if you have an ip you can try to ping some well known ip(we will use FreeBSD's website ip):&lt;br /&gt;
 ping 69.147.83.33:&lt;br /&gt;
if it works you can try to ping a website by its name:&lt;br /&gt;
 ping www.FreeBSD.org&lt;br /&gt;
If you are here it means that the internet works...&lt;br /&gt;
&lt;br /&gt;
in case you need to stop the internet you can do the following:&lt;br /&gt;
ifconfig tun0 will gives you something like this:&lt;br /&gt;
 tun0: flags=8051&amp;lt;UP,POINTOPOINT,RUNNING,MULTICAST&amp;gt; metric 0 mtu 1492&lt;br /&gt;
 	inet 79.31.183.27 --&amp;gt; 192.168.100.1 netmask 0xffffffff &lt;br /&gt;
 	Opened by PID 438&lt;br /&gt;
notice the line &amp;lt;i&amp;gt;Opened by PID 438&amp;lt;/i&amp;gt; here 438 is the PID of the ppp process...just kill it:&lt;br /&gt;
 kill 438&lt;br /&gt;
&amp;lt;i&amp;gt;remplace 438 by the pid you found doing ifconfig&amp;lt;/i&amp;gt;&lt;br /&gt;
Then we will need to destroy the tun0 interface:&lt;br /&gt;
 ifconfig tun0 destroy&lt;br /&gt;
&lt;br /&gt;
====Nat====&lt;br /&gt;
Then if you stoped your connection restart it,we need it in order to test the nat(that means network address translation...we need this in order to share our connection,see [http://en.wikipedia.org/wiki/Network_address_translation the wikipedia     article] if you are interrested)&lt;br /&gt;
&lt;br /&gt;
we need to bring up the other wired network interface or the wifi(not the one that you used for connecting to the pppoe modem) card and assign an ip to it,but we will use the wired card for simplicity&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;note that you need an [http://en.wikipedia.org/wiki/Ethernet_crossover_cable Ethernet crossover cable] if you connect directly to the FreeBSD machine&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on the FreeBSD AccessPoint assign an ip to the interface:&lt;br /&gt;
 ifconfig rl0 up&lt;br /&gt;
 ifconfig rl0 inet 192.168.1.1 netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
on FreeBSD client do:&lt;br /&gt;
 ifconfig rl0 up&lt;br /&gt;
 dhclient rl0&lt;br /&gt;
&lt;br /&gt;
or on GNU/Linux client do:&lt;br /&gt;
 ifconfig eth0 up&lt;br /&gt;
 dhclient eth0&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/PPPOE,_access_point</id>
		<title>PPPOE, access point</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/PPPOE,_access_point"/>
				<updated>2008-06-04T21:52:36Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* PPPOE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Some internet services provider such as alice in italy have a box(alice gate) that does everything(such as router and access point)...unfortunately we want to offer services to the internet such as:&lt;br /&gt;
*ssh&lt;br /&gt;
*web server &lt;br /&gt;
*port redirection for various applications such as games server(such as wormux that needs an open port in order to serve),or p2p&lt;br /&gt;
Fortunately the alice gate let us connect directly to the internet: see [http://wiki.openwrt.org/Alice here] for how to deactivate the router functions and so be connected directly to the internet...&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used the same hardware as in [[AccessPoint]] that is to say:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;br /&gt;
== Installation and Configuration==&lt;br /&gt;
* Install FreeBSD as usual.  This example uses FreeBSD 7.0.&lt;br /&gt;
* Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;sshd_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
===PPPOE===&lt;br /&gt;
This part can be difficult but we need internet working before following the installation&amp;lt;br&amp;gt;&lt;br /&gt;
here's my configuration file:&lt;br /&gt;
 default:&lt;br /&gt;
  set log Phase Chat LCP IPCP CCP tun command&lt;br /&gt;
  ident user-ppp VERSION (built COMPILATIONDATE)  &lt;br /&gt;
  &lt;br /&gt;
  # Ensure that &amp;quot;device&amp;quot; references the correct serial port&lt;br /&gt;
  # for your modem. (cuaa0 = COM1, cuaa1 = COM2)&lt;br /&gt;
  #&lt;br /&gt;
  set device /dev/cuaa1 &lt;br /&gt;
 &lt;br /&gt;
  set speed 115200&lt;br /&gt;
  set dial &amp;quot;ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \&lt;br /&gt;
            \&amp;quot;\&amp;quot; AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT&amp;quot;&lt;br /&gt;
  set timeout 180                        # 3 minute idle timer (the default)&lt;br /&gt;
  enable dns                             # request DNS info (for resolv.conf) &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 alice:&lt;br /&gt;
  disable ipv6cp&lt;br /&gt;
  add default HISADDR&lt;br /&gt;
  set device PPPoE:rl1&lt;br /&gt;
  set log Phase tun command&lt;br /&gt;
  set ifaddr 10.0.0.1/0 10.0.0.2/0&lt;br /&gt;
  set MRU 1490&lt;br /&gt;
  set MTU 1490&lt;br /&gt;
  # set log Phase tun command&lt;br /&gt;
  set authname username@alice.it&lt;br /&gt;
  set authkey password&lt;br /&gt;
  set dial&lt;br /&gt;
  set login&lt;br /&gt;
  set cd 5&lt;br /&gt;
  set redial 0 0&lt;br /&gt;
  set lqrperiod 5&lt;br /&gt;
  enable dns&lt;br /&gt;
  enable tcpmssfixup&lt;br /&gt;
  enable lqr&lt;br /&gt;
  #nat enable yes&lt;br /&gt;
  #nat use_sockets yes&lt;br /&gt;
  #nat unregistered_only yes&lt;br /&gt;
note the space at the beginning of the lines,&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;here you must change the interface that is rl1 in this line:&amp;lt;/i&amp;gt;&lt;br /&gt;
 set device PPPoE:rl1&lt;br /&gt;
i disabled ipv6 because it is not needed and messages error were comming in my logs about it,here's the line:&lt;br /&gt;
 disable ipv6cp&lt;br /&gt;
that is realy the lines that are in my configuration: that's because of my provider(alice from italy)...&lt;br /&gt;
 set authname username@alice.it&lt;br /&gt;
 set authkey password&lt;br /&gt;
you can also optionally change the name alice in this line:&lt;br /&gt;
 alice:&lt;br /&gt;
&lt;br /&gt;
if you do not have it add theses 2 line in /etc/syslog.conf:&lt;br /&gt;
 !ppp&lt;br /&gt;
 *.*                                             /var/log/ppp.log&lt;br /&gt;
that would permit you to see your log in a separate file that are in /var/log/ppp.log and /var/log/ppp.log.0.bz2(it get created when ppp.log is full, you can see it with bzcat)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
then we will run pppd:&lt;br /&gt;
 pppd -ddial -nat alice&lt;br /&gt;
it will create a log file in /var/log/ppp.log&amp;lt;br&amp;gt;&lt;br /&gt;
we will explain what nat means later&lt;br /&gt;
you should look at it and when it has finished to write things to it you can look if you get an ip on your tun interface:&lt;br /&gt;
 ifconfig tun0&lt;br /&gt;
&amp;lt;i&amp;gt;if you had already some tun interfaces before it will create a new one so change the interface name to the last created interface&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Then if you have an ip you can try to ping some well known ip(we will use FreeBSD's website ip):&lt;br /&gt;
 ping 69.147.83.33:&lt;br /&gt;
if it works you can try to ping a website by its name:&lt;br /&gt;
 ping www.FreeBSD.org&lt;br /&gt;
If you are here it means that the internet works...&lt;br /&gt;
&lt;br /&gt;
in case you need to stop the internet you can do the following:&lt;br /&gt;
ifconfig tun0 will gives you something like this:&lt;br /&gt;
 tun0: flags=8051&amp;lt;UP,POINTOPOINT,RUNNING,MULTICAST&amp;gt; metric 0 mtu 1492&lt;br /&gt;
 	inet 79.31.183.27 --&amp;gt; 192.168.100.1 netmask 0xffffffff &lt;br /&gt;
 	Opened by PID 438&lt;br /&gt;
notice the line &amp;lt;i&amp;gt;Opened by PID 438&amp;lt;/i&amp;gt; here 438 is the PID of the ppp process...just kill it:&lt;br /&gt;
 kill 438&lt;br /&gt;
&amp;lt;i&amp;gt;remplace 438 by the pid you found doing ifconfig&amp;lt;/i&amp;gt;&lt;br /&gt;
Then we will need to destroy the tun0 interface:&lt;br /&gt;
 ifconfig tun0 destroy&lt;br /&gt;
&lt;br /&gt;
====Nat====&lt;br /&gt;
Then if you stoped your connection restart it,we need it in order to test the nat(that means network address translation...we need this in order to share our connection,see [http://en.wikipedia.org/wiki/Network_address_translation the wikipedia     article] if you are interrested)&lt;br /&gt;
&lt;br /&gt;
we need to bring up the other wired network interface or the wifi(not the one that you used for connecting to the pppoe modem) card and assign an ip to it,but we will use the wired card for simplicity&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;note that you need an [http://en.wikipedia.org/wiki/Ethernet_crossover_cable Ethernet crossover cable] if you connect directly to the FreeBSD machine&amp;lt;/i&amp;gt;&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/PPPOE,_access_point</id>
		<title>PPPOE, access point</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/PPPOE,_access_point"/>
				<updated>2008-06-04T21:48:05Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* PPPOE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Some internet services provider such as alice in italy have a box(alice gate) that does everything(such as router and access point)...unfortunately we want to offer services to the internet such as:&lt;br /&gt;
*ssh&lt;br /&gt;
*web server &lt;br /&gt;
*port redirection for various applications such as games server(such as wormux that needs an open port in order to serve),or p2p&lt;br /&gt;
Fortunately the alice gate let us connect directly to the internet: see [http://wiki.openwrt.org/Alice here] for how to deactivate the router functions and so be connected directly to the internet...&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used the same hardware as in [[AccessPoint]] that is to say:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;br /&gt;
== Installation and Configuration==&lt;br /&gt;
* Install FreeBSD as usual.  This example uses FreeBSD 7.0.&lt;br /&gt;
* Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;sshd_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
===PPPOE===&lt;br /&gt;
This part can be difficult but we need internet working before following the installation&amp;lt;br&amp;gt;&lt;br /&gt;
here's my configuration file:&lt;br /&gt;
 default:&lt;br /&gt;
  set log Phase Chat LCP IPCP CCP tun command&lt;br /&gt;
  ident user-ppp VERSION (built COMPILATIONDATE)  &lt;br /&gt;
  &lt;br /&gt;
  # Ensure that &amp;quot;device&amp;quot; references the correct serial port&lt;br /&gt;
  # for your modem. (cuaa0 = COM1, cuaa1 = COM2)&lt;br /&gt;
  #&lt;br /&gt;
  set device /dev/cuaa1 &lt;br /&gt;
 &lt;br /&gt;
  set speed 115200&lt;br /&gt;
  set dial &amp;quot;ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \&lt;br /&gt;
            \&amp;quot;\&amp;quot; AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT&amp;quot;&lt;br /&gt;
  set timeout 180                        # 3 minute idle timer (the default)&lt;br /&gt;
  enable dns                             # request DNS info (for resolv.conf) &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 alice:&lt;br /&gt;
  disable ipv6cp&lt;br /&gt;
  add default HISADDR&lt;br /&gt;
  set device PPPoE:rl1&lt;br /&gt;
  set log Phase tun command&lt;br /&gt;
  set ifaddr 10.0.0.1/0 10.0.0.2/0&lt;br /&gt;
  set MRU 1490&lt;br /&gt;
  set MTU 1490&lt;br /&gt;
  # set log Phase tun command&lt;br /&gt;
  set authname username@alice.it&lt;br /&gt;
  set authkey password&lt;br /&gt;
  set dial&lt;br /&gt;
  set login&lt;br /&gt;
  set cd 5&lt;br /&gt;
  set redial 0 0&lt;br /&gt;
  set lqrperiod 5&lt;br /&gt;
  enable dns&lt;br /&gt;
  enable tcpmssfixup&lt;br /&gt;
  enable lqr&lt;br /&gt;
  #nat enable yes&lt;br /&gt;
  #nat use_sockets yes&lt;br /&gt;
  #nat unregistered_only yes&lt;br /&gt;
note the space at the beginning of the lines,&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;here you must change the interface that is rl1 in this line:&amp;lt;/i&amp;gt;&lt;br /&gt;
 set device PPPoE:rl1&lt;br /&gt;
i disabled ipv6 because it is not needed and messages error were comming in my logs about it,here's the line:&lt;br /&gt;
 disable ipv6cp&lt;br /&gt;
that is realy the lines that are in my configuration: that's because of my provider(alice from italy)...&lt;br /&gt;
 set authname username@alice.it&lt;br /&gt;
 set authkey password&lt;br /&gt;
you can also optionally change the name alice in this line:&lt;br /&gt;
 alice:&lt;br /&gt;
&lt;br /&gt;
if you do not have it add theses 2 line in /etc/syslog.conf:&lt;br /&gt;
 !ppp&lt;br /&gt;
 *.*                                             /var/log/ppp.log&lt;br /&gt;
that would permit you to see your log in a separate file that are in /var/log/ppp.log and /var/log/ppp.log.0.bz2(it get created when ppp.log is full, you can see it with bzcat)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
then we will run pppd:&lt;br /&gt;
 pppd -ddial -nat alice&lt;br /&gt;
it will create a log file in /var/log/ppp.log&amp;lt;br&amp;gt;&lt;br /&gt;
we will explain what nat means later&lt;br /&gt;
you should look at it and when it has finished to write things to it you can look if you get an ip on your tun interface:&lt;br /&gt;
 ifconfig tun0&lt;br /&gt;
&amp;lt;i&amp;gt;if you had already some tun interfaces before it will create a new one so change the interface name to the last created interface&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Then if you have an ip you can try to ping some well known ip(we will use FreeBSD's website ip):&lt;br /&gt;
 ping 69.147.83.33:&lt;br /&gt;
if it works you can try to ping a website by its name:&lt;br /&gt;
 ping www.FreeBSD.org&lt;br /&gt;
If you are here it means that the internet works...&lt;br /&gt;
&lt;br /&gt;
in case you need to stop the internet you can do the following:&lt;br /&gt;
ifconfig tun0 will gives you something like this:&lt;br /&gt;
 tun0: flags=8051&amp;lt;UP,POINTOPOINT,RUNNING,MULTICAST&amp;gt; metric 0 mtu 1492&lt;br /&gt;
 	inet 79.31.183.27 --&amp;gt; 192.168.100.1 netmask 0xffffffff &lt;br /&gt;
 	Opened by PID 438&lt;br /&gt;
notice the line &amp;lt;i&amp;gt;Opened by PID 438&amp;lt;/i&amp;gt; here 438 is the PID of the ppp process...just kill it:&lt;br /&gt;
 kill 438&lt;br /&gt;
&amp;lt;i&amp;gt;remplace 438 by the pid you found doing ifconfig&amp;lt;/i&amp;gt;&lt;br /&gt;
Then we will need to destroy the tun0 interface:&lt;br /&gt;
 ifconfig tun0 destroy&lt;br /&gt;
&lt;br /&gt;
then if you stoped your connection restart it,we need it in order to test the nat(that means network address translation...we need this in order to share our connection,see [http://en.wikipedia.org/wiki/Network_address_translation the wikipedia     article] if you are interrested)&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/PPPOE,_access_point</id>
		<title>PPPOE, access point</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/PPPOE,_access_point"/>
				<updated>2008-06-04T21:47:41Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* PPPOE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Some internet services provider such as alice in italy have a box(alice gate) that does everything(such as router and access point)...unfortunately we want to offer services to the internet such as:&lt;br /&gt;
*ssh&lt;br /&gt;
*web server &lt;br /&gt;
*port redirection for various applications such as games server(such as wormux that needs an open port in order to serve),or p2p&lt;br /&gt;
Fortunately the alice gate let us connect directly to the internet: see [http://wiki.openwrt.org/Alice here] for how to deactivate the router functions and so be connected directly to the internet...&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used the same hardware as in [[AccessPoint]] that is to say:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;br /&gt;
== Installation and Configuration==&lt;br /&gt;
* Install FreeBSD as usual.  This example uses FreeBSD 7.0.&lt;br /&gt;
* Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;sshd_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
===PPPOE===&lt;br /&gt;
This part can be difficult but we need internet working before following the installation&amp;lt;br&amp;gt;&lt;br /&gt;
here's my configuration file:&lt;br /&gt;
 default:&lt;br /&gt;
  set log Phase Chat LCP IPCP CCP tun command&lt;br /&gt;
  ident user-ppp VERSION (built COMPILATIONDATE)  &lt;br /&gt;
  &lt;br /&gt;
  # Ensure that &amp;quot;device&amp;quot; references the correct serial port&lt;br /&gt;
  # for your modem. (cuaa0 = COM1, cuaa1 = COM2)&lt;br /&gt;
  #&lt;br /&gt;
  set device /dev/cuaa1 &lt;br /&gt;
 &lt;br /&gt;
  set speed 115200&lt;br /&gt;
  set dial &amp;quot;ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \&lt;br /&gt;
            \&amp;quot;\&amp;quot; AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT&amp;quot;&lt;br /&gt;
  set timeout 180                        # 3 minute idle timer (the default)&lt;br /&gt;
  enable dns                             # request DNS info (for resolv.conf) &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 alice:&lt;br /&gt;
  disable ipv6cp&lt;br /&gt;
  add default HISADDR&lt;br /&gt;
  set device PPPoE:rl1&lt;br /&gt;
  set log Phase tun command&lt;br /&gt;
  set ifaddr 10.0.0.1/0 10.0.0.2/0&lt;br /&gt;
  set MRU 1490&lt;br /&gt;
  set MTU 1490&lt;br /&gt;
  # set log Phase tun command&lt;br /&gt;
  set authname username@alice.it&lt;br /&gt;
  set authkey password&lt;br /&gt;
  set dial&lt;br /&gt;
  set login&lt;br /&gt;
  set cd 5&lt;br /&gt;
  set redial 0 0&lt;br /&gt;
  set lqrperiod 5&lt;br /&gt;
  enable dns&lt;br /&gt;
  enable tcpmssfixup&lt;br /&gt;
  enable lqr&lt;br /&gt;
  #nat enable yes&lt;br /&gt;
  #nat use_sockets yes&lt;br /&gt;
  #nat unregistered_only yes&lt;br /&gt;
note the space at the beginning of the lines,&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;here you must change the interface that is rl1 in this line:&amp;lt;/i&amp;gt;&lt;br /&gt;
 set device PPPoE:rl1&lt;br /&gt;
i disabled ipv6 because it is not needed and messages error were comming in my logs about it,here's the line:&lt;br /&gt;
 disable ipv6cp&lt;br /&gt;
that is realy the lines that are in my configuration: that's because of my provider(alice from italy)...&lt;br /&gt;
 set authname username@alice.it&lt;br /&gt;
 set authkey password&lt;br /&gt;
you can also optionally change the name alice in this line:&lt;br /&gt;
 alice:&lt;br /&gt;
&lt;br /&gt;
if you do not have it add theses 2 line in /etc/syslog.conf:&lt;br /&gt;
 !ppp&lt;br /&gt;
 *.*                                             /var/log/ppp.log&lt;br /&gt;
that would permit you to see your log in a separate file that are in /var/log/ppp.log and /var/log/ppp.log.0.bz2(it get created when ppp.log is full, you can see it with bzcat)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
then we will run pppd:&lt;br /&gt;
 pppd -ddial -nat alice&lt;br /&gt;
it will create a log file in /var/log/ppp.log&amp;lt;br&amp;gt;&lt;br /&gt;
we will explain what nat means later&lt;br /&gt;
you should look at it and when it has finished to write things to it you can look if you get an ip on your tun interface:&lt;br /&gt;
 ifconfig tun0&lt;br /&gt;
&amp;lt;i&amp;gt;if you had already some tun interfaces before it will create a new one so change the interface name to the last created interface&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Then if you have an ip you can try to ping some well known ip(we will use FreeBSD's website ip):&lt;br /&gt;
 ping 69.147.83.33:&lt;br /&gt;
if it works you can try to ping a website by its name:&lt;br /&gt;
 ping www.FreeBSD.org&lt;br /&gt;
If you are here it means that the internet works...&lt;br /&gt;
&lt;br /&gt;
in case you need to stop the internet you can do the following:&lt;br /&gt;
ifconfig tun0 will gives you something like this:&lt;br /&gt;
 tun0: flags=8051&amp;lt;UP,POINTOPOINT,RUNNING,MULTICAST&amp;gt; metric 0 mtu 1492&lt;br /&gt;
 	inet 79.31.183.27 --&amp;gt; 192.168.100.1 netmask 0xffffffff &lt;br /&gt;
 	Opened by PID 438&lt;br /&gt;
notice the line &amp;lt;i&amp;gt;Opened by PID 438&amp;lt;/i&amp;gt; here 438 is the PID of the ppp process...just kill it:&lt;br /&gt;
 kill 438&lt;br /&gt;
&amp;lt;i&amp;gt;remplace 438 by the pid you found doing ifconfig&amp;lt;/i&amp;gt;&lt;br /&gt;
Then we will need to destroy the tun0 interface:&lt;br /&gt;
 ifconfig tun0 destroy&lt;br /&gt;
&lt;br /&gt;
then if you stoped your connection restart it,we need it in order to test the nat(that means network address translation...we need this in order to share our connection,see [http://en.wikipedia.org/wiki/Network_address_translation the wikipedia     article if you are interrested)&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/PPPOE,_access_point</id>
		<title>PPPOE, access point</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/PPPOE,_access_point"/>
				<updated>2008-06-04T21:45:07Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* PPPOE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Some internet services provider such as alice in italy have a box(alice gate) that does everything(such as router and access point)...unfortunately we want to offer services to the internet such as:&lt;br /&gt;
*ssh&lt;br /&gt;
*web server &lt;br /&gt;
*port redirection for various applications such as games server(such as wormux that needs an open port in order to serve),or p2p&lt;br /&gt;
Fortunately the alice gate let us connect directly to the internet: see [http://wiki.openwrt.org/Alice here] for how to deactivate the router functions and so be connected directly to the internet...&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used the same hardware as in [[AccessPoint]] that is to say:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;br /&gt;
== Installation and Configuration==&lt;br /&gt;
* Install FreeBSD as usual.  This example uses FreeBSD 7.0.&lt;br /&gt;
* Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;sshd_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
===PPPOE===&lt;br /&gt;
This part can be difficult but we need internet working before following the installation&amp;lt;br&amp;gt;&lt;br /&gt;
here's my configuration file:&lt;br /&gt;
 default:&lt;br /&gt;
  set log Phase Chat LCP IPCP CCP tun command&lt;br /&gt;
  ident user-ppp VERSION (built COMPILATIONDATE)  &lt;br /&gt;
  &lt;br /&gt;
  # Ensure that &amp;quot;device&amp;quot; references the correct serial port&lt;br /&gt;
  # for your modem. (cuaa0 = COM1, cuaa1 = COM2)&lt;br /&gt;
  #&lt;br /&gt;
  set device /dev/cuaa1 &lt;br /&gt;
 &lt;br /&gt;
  set speed 115200&lt;br /&gt;
  set dial &amp;quot;ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \&lt;br /&gt;
            \&amp;quot;\&amp;quot; AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT&amp;quot;&lt;br /&gt;
  set timeout 180                        # 3 minute idle timer (the default)&lt;br /&gt;
  enable dns                             # request DNS info (for resolv.conf) &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 alice:&lt;br /&gt;
  disable ipv6cp&lt;br /&gt;
  add default HISADDR&lt;br /&gt;
  set device PPPoE:rl1&lt;br /&gt;
  set log Phase tun command&lt;br /&gt;
  set ifaddr 10.0.0.1/0 10.0.0.2/0&lt;br /&gt;
  set MRU 1490&lt;br /&gt;
  set MTU 1490&lt;br /&gt;
  # set log Phase tun command&lt;br /&gt;
  set authname username@alice.it&lt;br /&gt;
  set authkey password&lt;br /&gt;
  set dial&lt;br /&gt;
  set login&lt;br /&gt;
  set cd 5&lt;br /&gt;
  set redial 0 0&lt;br /&gt;
  set lqrperiod 5&lt;br /&gt;
  enable dns&lt;br /&gt;
  enable tcpmssfixup&lt;br /&gt;
  enable lqr&lt;br /&gt;
  #nat enable yes&lt;br /&gt;
  #nat use_sockets yes&lt;br /&gt;
  #nat unregistered_only yes&lt;br /&gt;
note the space at the beginning of the lines,&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;here you must change the interface that is rl1 in this line:&amp;lt;/i&amp;gt;&lt;br /&gt;
 set device PPPoE:rl1&lt;br /&gt;
i disabled ipv6 because it is not needed and messages error were comming in my logs about it,here's the line:&lt;br /&gt;
 disable ipv6cp&lt;br /&gt;
that is realy the lines that are in my configuration: that's because of my provider(alice from italy)...&lt;br /&gt;
 set authname username@alice.it&lt;br /&gt;
 set authkey password&lt;br /&gt;
you can also optionally change the name alice in this line:&lt;br /&gt;
 alice:&lt;br /&gt;
&lt;br /&gt;
if you do not have it add theses 2 line in /etc/syslog.conf:&lt;br /&gt;
 !ppp&lt;br /&gt;
 *.*                                             /var/log/ppp.log&lt;br /&gt;
that would permit you to see your log in a separate file that are in /var/log/ppp.log and /var/log/ppp.log.0.bz2(it get created when ppp.log is full, you can see it with bzcat)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
then we will run pppd:&lt;br /&gt;
 pppd -ddial -nat alice&lt;br /&gt;
it will create a log file in /var/log/ppp.log&amp;lt;br&amp;gt;&lt;br /&gt;
we will explain what nat means later&lt;br /&gt;
you should look at it and when it has finished to write things to it you can look if you get an ip on your tun interface:&lt;br /&gt;
 ifconfig tun0&lt;br /&gt;
&amp;lt;i&amp;gt;if you had already some tun interfaces before it will create a new one so change the interface name to the last created interface&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Then if you have an ip you can try to ping some well known ip(we will use FreeBSD's website ip):&lt;br /&gt;
 ping 69.147.83.33:&lt;br /&gt;
if it works you can try to ping a website by its name:&lt;br /&gt;
 ping www.FreeBSD.org&lt;br /&gt;
If you are here it means that the internet works...&lt;br /&gt;
&lt;br /&gt;
in case you need to stop the internet you can do the following:&lt;br /&gt;
ifconfig tun0 will gives you something like this:&lt;br /&gt;
 tun0: flags=8051&amp;lt;UP,POINTOPOINT,RUNNING,MULTICAST&amp;gt; metric 0 mtu 1492&lt;br /&gt;
 	inet 79.31.183.27 --&amp;gt; 192.168.100.1 netmask 0xffffffff &lt;br /&gt;
 	Opened by PID 438&lt;br /&gt;
notice the line &amp;lt;i&amp;gt;Opened by PID 438&amp;lt;/i&amp;gt; here 438 is the PID of the ppp process...just kill it:&lt;br /&gt;
 kill 438&lt;br /&gt;
&amp;lt;i&amp;gt;remplace 438 by the pid you found doing ifconfig&amp;lt;/i&amp;gt;&lt;br /&gt;
Then we will need to destroy the tun0 interface:&lt;br /&gt;
 ifconfig tun0 destroy&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/PPPOE,_access_point</id>
		<title>PPPOE, access point</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/PPPOE,_access_point"/>
				<updated>2008-06-04T21:44:15Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* PPPOE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Some internet services provider such as alice in italy have a box(alice gate) that does everything(such as router and access point)...unfortunately we want to offer services to the internet such as:&lt;br /&gt;
*ssh&lt;br /&gt;
*web server &lt;br /&gt;
*port redirection for various applications such as games server(such as wormux that needs an open port in order to serve),or p2p&lt;br /&gt;
Fortunately the alice gate let us connect directly to the internet: see [http://wiki.openwrt.org/Alice here] for how to deactivate the router functions and so be connected directly to the internet...&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used the same hardware as in [[AccessPoint]] that is to say:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;br /&gt;
== Installation and Configuration==&lt;br /&gt;
* Install FreeBSD as usual.  This example uses FreeBSD 7.0.&lt;br /&gt;
* Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;sshd_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
===PPPOE===&lt;br /&gt;
This part can be difficult but we need internet working before following the installation&amp;lt;br&amp;gt;&lt;br /&gt;
here's my configuration file:&lt;br /&gt;
 default:&lt;br /&gt;
  set log Phase Chat LCP IPCP CCP tun command&lt;br /&gt;
  ident user-ppp VERSION (built COMPILATIONDATE)  &lt;br /&gt;
  &lt;br /&gt;
  # Ensure that &amp;quot;device&amp;quot; references the correct serial port&lt;br /&gt;
  # for your modem. (cuaa0 = COM1, cuaa1 = COM2)&lt;br /&gt;
  #&lt;br /&gt;
  set device /dev/cuaa1 &lt;br /&gt;
 &lt;br /&gt;
  set speed 115200&lt;br /&gt;
  set dial &amp;quot;ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \&lt;br /&gt;
            \&amp;quot;\&amp;quot; AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT&amp;quot;&lt;br /&gt;
  set timeout 180                        # 3 minute idle timer (the default)&lt;br /&gt;
  enable dns                             # request DNS info (for resolv.conf) &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 alice:&lt;br /&gt;
  disable ipv6cp&lt;br /&gt;
  add default HISADDR&lt;br /&gt;
  set device PPPoE:rl1&lt;br /&gt;
  set log Phase tun command&lt;br /&gt;
  set ifaddr 10.0.0.1/0 10.0.0.2/0&lt;br /&gt;
  set MRU 1490&lt;br /&gt;
  set MTU 1490&lt;br /&gt;
  # set log Phase tun command&lt;br /&gt;
  set authname username@alice.it&lt;br /&gt;
  set authkey password&lt;br /&gt;
  set dial&lt;br /&gt;
  set login&lt;br /&gt;
  set cd 5&lt;br /&gt;
  set redial 0 0&lt;br /&gt;
  set lqrperiod 5&lt;br /&gt;
  enable dns&lt;br /&gt;
  enable tcpmssfixup&lt;br /&gt;
  enable lqr&lt;br /&gt;
  #nat enable yes&lt;br /&gt;
  #nat use_sockets yes&lt;br /&gt;
  #nat unregistered_only yes&lt;br /&gt;
note the space at the beginning of the lines,&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;here you must change the interface that is rl1 in this line:&amp;lt;/i&amp;gt;&lt;br /&gt;
 set device PPPoE:rl1&lt;br /&gt;
i disabled ipv6 because it is not needed and messages error were comming in my logs about it,here's the line:&lt;br /&gt;
 disable ipv6cp&lt;br /&gt;
that is realy the lines that are in my configuration: that's because of my provider(alice from italy)...&lt;br /&gt;
 set authname username@alice.it&lt;br /&gt;
 set authkey password&lt;br /&gt;
you can also optionally change the name alice in this line:&lt;br /&gt;
 alice:&lt;br /&gt;
&lt;br /&gt;
if you do not have it add theses 2 line in /etc/syslog.conf:&lt;br /&gt;
 !ppp&lt;br /&gt;
 *.*                                             /var/log/ppp.log&lt;br /&gt;
that would permit you to see your log in a separate file that are in /var/log/ppp.log and /var/log/ppp.log.0.bz2(it get created when ppp.log is full, you can see it with bzcat)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
then we will run pppd:&lt;br /&gt;
 pppd -ddial -nat alice&lt;br /&gt;
it will create a log file in /var/log/ppp.log&lt;br /&gt;
you should look at it and when it has finished to write things to it you can look if you get an ip on your tun interface:&lt;br /&gt;
 ifconfig tun0&lt;br /&gt;
&amp;lt;i&amp;gt;if you had already some tun interfaces before it will create a new one so change the interface name to the last created interface&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Then if you have an ip you can try to ping some well known ip(we will use FreeBSD's website ip):&lt;br /&gt;
 ping 69.147.83.33:&lt;br /&gt;
if it works you can try to ping a website by its name:&lt;br /&gt;
 ping www.FreeBSD.org&lt;br /&gt;
If you are here it means that the internet works...&lt;br /&gt;
&lt;br /&gt;
in case you need to stop the internet you can do the following:&lt;br /&gt;
ifconfig tun0 will gives you something like this:&lt;br /&gt;
 tun0: flags=8051&amp;lt;UP,POINTOPOINT,RUNNING,MULTICAST&amp;gt; metric 0 mtu 1492&lt;br /&gt;
 	inet 79.31.183.27 --&amp;gt; 192.168.100.1 netmask 0xffffffff &lt;br /&gt;
 	Opened by PID 438&lt;br /&gt;
notice the line &amp;lt;i&amp;gt;Opened by PID 438&amp;lt;/i&amp;gt; here 438 is the PID of the ppp process...just kill it:&lt;br /&gt;
 kill 438&lt;br /&gt;
&amp;lt;i&amp;gt;remplace 438 by the pid you found doing ifconfig&amp;lt;/i&amp;gt;&lt;br /&gt;
Then we will need to destroy the tun0 interface:&lt;br /&gt;
 ifconfig tun0 destroy&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/PPPOE,_access_point</id>
		<title>PPPOE, access point</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/PPPOE,_access_point"/>
				<updated>2008-06-04T21:43:04Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Some internet services provider such as alice in italy have a box(alice gate) that does everything(such as router and access point)...unfortunately we want to offer services to the internet such as:&lt;br /&gt;
*ssh&lt;br /&gt;
*web server &lt;br /&gt;
*port redirection for various applications such as games server(such as wormux that needs an open port in order to serve),or p2p&lt;br /&gt;
Fortunately the alice gate let us connect directly to the internet: see [http://wiki.openwrt.org/Alice here] for how to deactivate the router functions and so be connected directly to the internet...&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used the same hardware as in [[AccessPoint]] that is to say:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;br /&gt;
== Installation and Configuration==&lt;br /&gt;
* Install FreeBSD as usual.  This example uses FreeBSD 7.0.&lt;br /&gt;
* Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;sshd_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
===PPPOE===&lt;br /&gt;
This part can be difficult but we need internet working before following the installation&amp;lt;br&amp;gt;&lt;br /&gt;
here's my configuration file:&lt;br /&gt;
 default:&lt;br /&gt;
  set log Phase Chat LCP IPCP CCP tun command&lt;br /&gt;
  ident user-ppp VERSION (built COMPILATIONDATE)  &lt;br /&gt;
  &lt;br /&gt;
  # Ensure that &amp;quot;device&amp;quot; references the correct serial port&lt;br /&gt;
  # for your modem. (cuaa0 = COM1, cuaa1 = COM2)&lt;br /&gt;
  #&lt;br /&gt;
  set device /dev/cuaa1 &lt;br /&gt;
 &lt;br /&gt;
  set speed 115200&lt;br /&gt;
  set dial &amp;quot;ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \&lt;br /&gt;
            \&amp;quot;\&amp;quot; AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT&amp;quot;&lt;br /&gt;
  set timeout 180                        # 3 minute idle timer (the default)&lt;br /&gt;
  enable dns                             # request DNS info (for resolv.conf) &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 alice:&lt;br /&gt;
  disable ipv6cp&lt;br /&gt;
  add default HISADDR&lt;br /&gt;
  set device PPPoE:rl1&lt;br /&gt;
  set log Phase tun command&lt;br /&gt;
  set ifaddr 10.0.0.1/0 10.0.0.2/0&lt;br /&gt;
  set MRU 1490&lt;br /&gt;
  set MTU 1490&lt;br /&gt;
  # set log Phase tun command&lt;br /&gt;
  set authname username@alice.it&lt;br /&gt;
  set authkey password&lt;br /&gt;
  set dial&lt;br /&gt;
  set login&lt;br /&gt;
  set cd 5&lt;br /&gt;
  set redial 0 0&lt;br /&gt;
  set lqrperiod 5&lt;br /&gt;
  enable dns&lt;br /&gt;
  enable tcpmssfixup&lt;br /&gt;
  enable lqr&lt;br /&gt;
  #nat enable yes&lt;br /&gt;
  #nat use_sockets yes&lt;br /&gt;
  #nat unregistered_only yes&lt;br /&gt;
note the space at the beginning of the lines,&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;here you must change the interface that is rl1 in this line:&amp;lt;/i&amp;gt;&lt;br /&gt;
 set device PPPoE:rl1&lt;br /&gt;
i disabled ipv6 because it is not needed and messages error were comming in my logs about it,here's the line:&lt;br /&gt;
 disable ipv6cp&lt;br /&gt;
that is realy the lines that are in my configuration: that's because of my provider(alice from italy)...&lt;br /&gt;
 set authname username@alice.it&lt;br /&gt;
 set authkey password&lt;br /&gt;
you can also optionally change the name alice in this line:&lt;br /&gt;
 alice:&lt;br /&gt;
&lt;br /&gt;
if you do not have it add theses 2 line in /etc/syslog.conf:&lt;br /&gt;
 !ppp&lt;br /&gt;
 *.*                                             /var/log/ppp.log&lt;br /&gt;
that would permit you to see your log in a separate file that are in /var/log/ppp.log and /var/log/ppp.log.0.bz2(it get created when ppp.log is full, you can see it with bzcat)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
then we will run pppd:&lt;br /&gt;
 pppd -ddial -nat alice&lt;br /&gt;
it will create a log file in /var/log/ppp.log&lt;br /&gt;
you should look at it and when it has finished to write things to it you can look if you get an ip on your tun interface:&lt;br /&gt;
 ifconfig tun0&lt;br /&gt;
&amp;lt;i&amp;gt;if you had already some tun interfaces before it will create a new one so change the interface name to the last created interface&amp;lt;/i&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Then if you have an ip you can try to ping some well known ip(we will use FreeBSD's website ip):&lt;br /&gt;
 ping 69.147.83.33:&lt;br /&gt;
if it works you can try to ping a website by its name:&lt;br /&gt;
 ping www.FreeBSD.org&lt;br /&gt;
If you are here it means that the internet works...&lt;br /&gt;
&lt;br /&gt;
in case you need to stop the internet you can do the following:&lt;br /&gt;
ifconfig tun0 will gives you something like this:&lt;br /&gt;
 tun0: flags=8051&amp;lt;UP,POINTOPOINT,RUNNING,MULTICAST&amp;gt; metric 0 mtu 1492&lt;br /&gt;
	inet 79.31.183.27 --&amp;gt; 192.168.100.1 netmask 0xffffffff &lt;br /&gt;
	Opened by PID 438&lt;br /&gt;
notice the line &amp;lt;i&amp;gt;Opened by PID 438&amp;lt;/i&amp;gt; here 438 is the PID of the ppp process...just kill it:&lt;br /&gt;
 kill 438&lt;br /&gt;
&amp;lt;i&amp;gt;remplace 438 by the pid you found doing ifconfig&amp;lt;/i&amp;gt;&lt;br /&gt;
Then we will need to destroy the tun0 interface:&lt;br /&gt;
 ifconfig tun0 destroy&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/PPPOE,_access_point</id>
		<title>PPPOE, access point</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/PPPOE,_access_point"/>
				<updated>2008-06-04T21:34:24Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* PPPOE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Some internet services provider such as alice in italy have a box(alice gate) that does everything(such as router and access point)...unfortunately we want to offer services to the internet such as:&lt;br /&gt;
*ssh&lt;br /&gt;
*web server &lt;br /&gt;
*port redirection for various applications such as games server(such as wormux that needs an open port in order to serve),or p2p&lt;br /&gt;
Fortunately the alice gate let us connect directly to the internet: see [http://wiki.openwrt.org/Alice here] for how to deactivate the router functions and so be connected directly to the internet...&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used the same hardware as in [[AccessPoint]] that is to say:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;br /&gt;
== Installation and Configuration==&lt;br /&gt;
* Install FreeBSD as usual.  This example uses FreeBSD 7.0.&lt;br /&gt;
* Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;sshd_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
===PPPOE===&lt;br /&gt;
This part can be difficult but we need internet working before following the installation&amp;lt;br&amp;gt;&lt;br /&gt;
here's my configuration file:&lt;br /&gt;
 default:&lt;br /&gt;
  set log Phase Chat LCP IPCP CCP tun command&lt;br /&gt;
  ident user-ppp VERSION (built COMPILATIONDATE)  &lt;br /&gt;
  &lt;br /&gt;
  # Ensure that &amp;quot;device&amp;quot; references the correct serial port&lt;br /&gt;
  # for your modem. (cuaa0 = COM1, cuaa1 = COM2)&lt;br /&gt;
  #&lt;br /&gt;
  set device /dev/cuaa1 &lt;br /&gt;
 &lt;br /&gt;
  set speed 115200&lt;br /&gt;
  set dial &amp;quot;ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \&lt;br /&gt;
            \&amp;quot;\&amp;quot; AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT&amp;quot;&lt;br /&gt;
  set timeout 180                        # 3 minute idle timer (the default)&lt;br /&gt;
  enable dns                             # request DNS info (for resolv.conf) &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 alice:&lt;br /&gt;
  disable ipv6cp&lt;br /&gt;
  add default HISADDR&lt;br /&gt;
  set device PPPoE:rl1&lt;br /&gt;
  set log Phase tun command&lt;br /&gt;
  set ifaddr 10.0.0.1/0 10.0.0.2/0&lt;br /&gt;
  set MRU 1490&lt;br /&gt;
  set MTU 1490&lt;br /&gt;
  # set log Phase tun command&lt;br /&gt;
  set authname username@alice.it&lt;br /&gt;
  set authkey password&lt;br /&gt;
  set dial&lt;br /&gt;
  set login&lt;br /&gt;
  set cd 5&lt;br /&gt;
  set redial 0 0&lt;br /&gt;
  set lqrperiod 5&lt;br /&gt;
  enable dns&lt;br /&gt;
  enable tcpmssfixup&lt;br /&gt;
  enable lqr&lt;br /&gt;
  #nat enable yes&lt;br /&gt;
  #nat use_sockets yes&lt;br /&gt;
  #nat unregistered_only yes&lt;br /&gt;
note the space at the beginning of the lines,&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;here you must change the interface that is rl1 in this line:&amp;lt;/i&amp;gt;&lt;br /&gt;
 set device PPPoE:rl1&lt;br /&gt;
i disabled ipv6 because it is not needed and messages error were comming in my logs about it,here's the line:&lt;br /&gt;
 disable ipv6cp&lt;br /&gt;
that is realy the lines that are in my configuration: that's because of my provider(alice from italy)...&lt;br /&gt;
 set authname username@alice.it&lt;br /&gt;
 set authkey password&lt;br /&gt;
you can also optionally change the name alice in this line:&lt;br /&gt;
 alice:&lt;br /&gt;
&lt;br /&gt;
if you do not have it add theses 2 line in /etc/syslog.conf:&lt;br /&gt;
 !ppp&lt;br /&gt;
 *.*                                             /var/log/ppp.log&lt;br /&gt;
that would permit you to see your log in a separate file that are in /var/log/ppp.log and /var/log/ppp.log.0.bz2(it get created when ppp.log is full, you can see it with bzcat)&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/PPPOE,_access_point</id>
		<title>PPPOE, access point</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/PPPOE,_access_point"/>
				<updated>2008-06-04T21:22:17Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* Installation and Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Some internet services provider such as alice in italy have a box(alice gate) that does everything(such as router and access point)...unfortunately we want to offer services to the internet such as:&lt;br /&gt;
*ssh&lt;br /&gt;
*web server &lt;br /&gt;
*port redirection for various applications such as games server(such as wormux that needs an open port in order to serve),or p2p&lt;br /&gt;
Fortunately the alice gate let us connect directly to the internet: see [http://wiki.openwrt.org/Alice here] for how to deactivate the router functions and so be connected directly to the internet...&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used the same hardware as in [[AccessPoint]] that is to say:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;br /&gt;
== Installation and Configuration==&lt;br /&gt;
* Install FreeBSD as usual.  This example uses FreeBSD 7.0.&lt;br /&gt;
* Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;sshd_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
===PPPOE===&lt;br /&gt;
This part can be difficult but we need internet working before following the installation&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/PPPOE,_access_point</id>
		<title>PPPOE, access point</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/PPPOE,_access_point"/>
				<updated>2008-06-04T21:17:52Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* The hardware */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Some internet services provider such as alice in italy have a box(alice gate) that does everything(such as router and access point)...unfortunately we want to offer services to the internet such as:&lt;br /&gt;
*ssh&lt;br /&gt;
*web server &lt;br /&gt;
*port redirection for various applications such as games server(such as wormux that needs an open port in order to serve),or p2p&lt;br /&gt;
Fortunately the alice gate let us connect directly to the internet: see [http://wiki.openwrt.org/Alice here] for how to deactivate the router functions and so be connected directly to the internet...&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used the same hardware as in [[AccessPoint]] that is to say:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;br /&gt;
== Installation and Configuration==&lt;br /&gt;
* Install FreeBSD as usual.  This example uses FreeBSD 7.0.&lt;br /&gt;
* Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;sshd_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/PPPOE,_access_point</id>
		<title>PPPOE, access point</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/PPPOE,_access_point"/>
				<updated>2008-06-04T21:16:53Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Some internet services provider such as alice in italy have a box(alice gate) that does everything(such as router and access point)...unfortunately we want to offer services to the internet such as:&lt;br /&gt;
*ssh&lt;br /&gt;
*web server &lt;br /&gt;
*port redirection for various applications such as games server(such as wormux that needs an open port in order to serve),or p2p&lt;br /&gt;
Fortunately the alice gate let us connect directly to the internet: see [http://wiki.openwrt.org/Alice here] for how to deactivate the router functions and so be connected directly to the internet...&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used the same hardware as in [[AccessPoint]] that is to say:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/PPPOE,_access_point</id>
		<title>PPPOE, access point</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/PPPOE,_access_point"/>
				<updated>2008-06-04T21:14:57Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Some internet services provider such as alice in italy have a box(alice gate) that does everything(such as router and access point)...unfortunately we want to offer services to the internet such as:&lt;br /&gt;
*ssh&lt;br /&gt;
*web server &lt;br /&gt;
*port redirection for various applications such as games server(such as wormux that needs an open port in order to serve),or p2p&lt;br /&gt;
Fortunately the alice gate let us connect directly to the internet: see [http://wiki.openwrt.org/Alice here] for how to desactivate the router functions and so be connected directly to the internet...&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/PPPOE,_access_point</id>
		<title>PPPOE, access point</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/PPPOE,_access_point"/>
				<updated>2008-06-04T21:14:35Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Some internet services provider such as alice in italy have a box(alice gate) that does everything(such as router)...unfortunately we want to offer services to the internet such as:&lt;br /&gt;
*ssh&lt;br /&gt;
*web server &lt;br /&gt;
*port redirection for various applications such as games server(such as wormux that needs an open port in order to serve),or p2p&lt;br /&gt;
Fortunately the alice gate let us connect directly to the internet: see [http://wiki.openwrt.org/Alice here] for how to desactivate the router functions and so be connected directly to the internet...&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/AccessPoint</id>
		<title>AccessPoint</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/AccessPoint"/>
				<updated>2008-06-04T21:09:09Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
FreeBSD is very well suited for use as a wifi access point as it has 'master mode' support for a variety of wifi network cards, out of the box.  Some of these include ralink and Atheros cards.&lt;br /&gt;
&lt;br /&gt;
There are many difficulties setting up a wireless network access point on linux.  Some of the problems(with non madwifi cards) include:&lt;br /&gt;
*You must use a kernel that is yet-to-be released (2.6.26-rc4).&lt;br /&gt;
*You must patch the kernel. [http://johannes.sipsolutions.net/patches/kernel/all/LATEST/006-allow-ap-vlan-modes.patch Download Patch]&lt;br /&gt;
*You must compile a recent libnl(I used libnl-1.1-r1, on Gentoo) against the custom kernel.&lt;br /&gt;
*On Gentoo you need to copy nl80211.h from your kenrel directory to /usr/include/linux&lt;br /&gt;
*Finally, you need to compile a git version of hostapd...&lt;br /&gt;
&lt;br /&gt;
All of the above steps must be completed for maximum support of various wireless network cards.  Most other sets are fairly similar to those on FreeBSD.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;On this Howto we will assume that your modem gives you a dhcp address,see [[AccessPoint using pppoe]] if you need to setup PPPOE&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;br /&gt;
&lt;br /&gt;
== Installation and Configuration==&lt;br /&gt;
* Install FreeBSD as usual.  This example uses FreeBSD 7.0.&lt;br /&gt;
* Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;sshd_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If you have a DHCP-enabled modem, you can add the following to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig_rl0=&amp;quot;DHCP&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;Note, make certain you replace rl0 with your wired network interface name.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Wireless===&lt;br /&gt;
To configure the wireless card, the following commands need to be executed:&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig ral0 inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that, in the [http://www.freebsd.org/handbook FreeBSD Handbook], inet is placed incorrectly.  Also, make certain to include a channel number.  Without it, I was unable to get this working.&lt;br /&gt;
&lt;br /&gt;
Next, try to associate to the new AP from a client. If something goes wrong (i.e. ping doesn't work), look to dmesg for debugging output.  Specifically, look for association messages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, if you can see the wireless network, and can ping it, simply add the following to /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig_ral0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Useful Association Commands ====&lt;br /&gt;
&lt;br /&gt;
Under GNU/Linux type as root(remplacing wlan0 by your wifi card interface name):&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig wlan0 up&lt;br /&gt;
 iwlist wlan0 scan&lt;br /&gt;
 iwconfig wlan0 essid &amp;quot;freebsdap&amp;quot;&lt;br /&gt;
 ifconfig wlan0 192.168.1.100 netmask 255.255.255.0&lt;br /&gt;
 ping 192.168.1.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
Under FreeBSD type as root(remplacing ral0 by your wifi card interface name):&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig ral0 up&lt;br /&gt;
 ifconfig ral0 list scan&lt;br /&gt;
 ifconfig ral0 inet 192.168.1.100 netmask 255.255.255.0 ssid freebsdap&lt;br /&gt;
 ping 192.168.1.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DNS and DHCP===&lt;br /&gt;
Once the wireless AP is working, we can install DNS and DHCP servers.  For simplicity, we will use dnsmasq.  As root, execute the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /usr/ports/dns/dnsmasq &amp;amp;&amp;amp; make config &amp;amp;&amp;amp; make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the configuration menu, deselect the followingn options:&lt;br /&gt;
* ipv6&lt;br /&gt;
* dbus&lt;br /&gt;
&lt;br /&gt;
Once installed, we need to configure dnsmasq:&lt;br /&gt;
&lt;br /&gt;
Edit /usr/local/etc/dnsmasq.conf with your favorite editor and add the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;# filter what we send upstream&lt;br /&gt;
domain-needed&lt;br /&gt;
bogus-priv&lt;br /&gt;
filterwin2k&lt;br /&gt;
localise-queries&lt;br /&gt;
 &lt;br /&gt;
# allow /etc/hosts and dhcp lookups via *.lan&lt;br /&gt;
local=/lan/&lt;br /&gt;
domain=workgroup&lt;br /&gt;
expand-hosts&lt;br /&gt;
#resolv-file=/tmp/resolv.conf.auto&lt;br /&gt;
 &lt;br /&gt;
dhcp-authoritative&lt;br /&gt;
#dhcp-leasefile=/tmp/dhcp.leases&lt;br /&gt;
 &lt;br /&gt;
# use /etc/ethers for static hosts; same format as --dhcp-host&lt;br /&gt;
# &amp;lt;hwaddr&amp;gt; &amp;lt;ipaddr&amp;gt;&lt;br /&gt;
read-ethers&lt;br /&gt;
 &lt;br /&gt;
# other useful options:&lt;br /&gt;
# default route(s):&lt;br /&gt;
dhcp-option=3,192.168.1.1&lt;br /&gt;
#    dns server(s):&lt;br /&gt;
dhcp-option=6,192.168.1.1&lt;br /&gt;
&lt;br /&gt;
dhcp-range=192.168.1.100,192.168.1.255,255.255.255.0,12h&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The option, read-ethers, permits you to assign statics IPs to certain MAC addresses.  Edit /etc/ethers with entries as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;00:14:85:11:EF:02 192.168.1.106&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to give a DNS name to this entry, edit /etc/hosts and add an entry like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;192.168.1.106 Ralink&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To start your dnsmasq server at boot, add the following to /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;dnsmasq_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now test the wifi connection with any graphical tool (like NetworkManager in GNU/linux or even test it with a windows computer) you can even try to ping a website... but you will only get his ip and no response...that's because we didn't set up the NAT yet...&lt;br /&gt;
&lt;br /&gt;
==Nat and firewall==&lt;br /&gt;
in order to set the nat we will add this to /etc/rc.conf:(remplacing ral0 by your wired card(that is connected to the internet) interface name)::&lt;br /&gt;
 gateway_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_type=&amp;quot;OPEN&amp;quot;&lt;br /&gt;
 natd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 natd_interface=&amp;quot;rl0&amp;quot;&lt;br /&gt;
 natd_flags=&amp;quot;&amp;quot;&lt;br /&gt;
if you wish to redirect ports add this to natd_flags=&amp;quot;&amp;quot; in /etc/rc.conf:&lt;br /&gt;
 -redirect_port tcp 192.168.0.6:80 80&lt;br /&gt;
&lt;br /&gt;
now normally the access point should work...&lt;br /&gt;
&lt;br /&gt;
==OpenVPN==&lt;br /&gt;
===Introduction===&lt;br /&gt;
now that we have wireless we could choose between theses choices:&lt;br /&gt;
*having a full open wireless(not great for security)&lt;br /&gt;
*having a wpa wireless(not compatible with all drivers,devices doesn't always work),no guests...&lt;br /&gt;
*having an open wireless while encrypting the data sent to to wireless access point...yes that is possible...with the help of openvpn&lt;br /&gt;
&lt;br /&gt;
i chose the third possibility.&lt;br /&gt;
===installation===&lt;br /&gt;
here the commands to run in order to install openvpn:&lt;br /&gt;
 cd /usr/ports/security/openvpn&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
===configuration===&lt;br /&gt;
====EasyRsa====&lt;br /&gt;
install bash:&lt;br /&gt;
 cd /usr/ports/shells/bash&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 ln -s /usr/local/bin/bash /bin/bash &lt;br /&gt;
run theses commands:&lt;br /&gt;
 cp -r /usr/local/share/doc/openvpn/easy-rsa/2.0/ /root/easy-rsa-2.0&lt;br /&gt;
here we will copy it in order not to have our keys erased by an update...&lt;br /&gt;
then we will need bash run:&lt;br /&gt;
 /bin/bash&lt;br /&gt;
 cd /root/easy-rsa-2.0&lt;br /&gt;
then we will make the certificates:&lt;br /&gt;
modify the vars script in order to suit your needs,then run:&lt;br /&gt;
 source ./vars&lt;br /&gt;
 ./clean all&lt;br /&gt;
 ./build-ca ca&lt;br /&gt;
then we will build the server key:&lt;br /&gt;
 ./build-key-server server&lt;br /&gt;
then we will build the clients key:&lt;br /&gt;
 ./build-key client1&lt;br /&gt;
 ./build-key client2&lt;br /&gt;
then we genreate diffie helman parameters:&lt;br /&gt;
 ./build-dh&lt;br /&gt;
&lt;br /&gt;
in order to build a new client just do:&lt;br /&gt;
 source ./vars&lt;br /&gt;
 ./build-key client2&lt;br /&gt;
&lt;br /&gt;
then copy the keys at the keys location:&lt;br /&gt;
 cp -r keys /usr/local/etc/openvpn/keys&lt;br /&gt;
alternatively you can do the following:&lt;br /&gt;
 mkdir /usr/local/etc/openvpn/keys/&lt;br /&gt;
 cd /root/easy-rsa-2.0/keys&lt;br /&gt;
 cp ca.crt /usr/local/etc/openvpn/keys/ca.crt&lt;br /&gt;
 cp server.crt /usr/local/etc/openvpn/keys/server.crt&lt;br /&gt;
 cp server.key /usr/local/etc/openvpn/keys/server.key&lt;br /&gt;
 cp dh1024.pem /usr/local/etc/openvpn/keys/dh1024.pem&lt;br /&gt;
&lt;br /&gt;
====OpenVpn configuration====&lt;br /&gt;
We will first install all in test-mode that is to say not runnning at the boot,not running as daemon etc...&lt;br /&gt;
we will run theses commands:&lt;br /&gt;
 ifconfig tap0 destroy&lt;br /&gt;
 ifconfig bridge0 destroy&lt;br /&gt;
 ifconfig tun0 destroy&lt;br /&gt;
 ifconfig bridge0 create&lt;br /&gt;
 ifconfig tap0 create&lt;br /&gt;
 #remplace ral0 by your card interface name&lt;br /&gt;
 ifconfig bridge0 addm ral0 addm tap0 up&lt;br /&gt;
 ifconfig br0 192.168.1.1&lt;br /&gt;
then here's my server configuration for openvpn:&lt;br /&gt;
 ca /usr/local/etc/openvpn/keys/ca.crt&lt;br /&gt;
 cert /usr/local/etc/openvpn/keys/server.crt&lt;br /&gt;
 key /usr/local/etc/openvpn/keys/server.key&lt;br /&gt;
 dh /usr/local/etc/openvpn/keys/dh1024.pem&lt;br /&gt;
 dev tap&lt;br /&gt;
 # replace 10.0.0.1 with the VPN IP&lt;br /&gt;
 server-bridge 10.0.0.1 255.255.255.0 10.0.0.2 10.0.0.250&lt;br /&gt;
 keepalive 10 120&lt;br /&gt;
 client-to-client&lt;br /&gt;
 verb 3&lt;br /&gt;
 duplicate-cn&lt;br /&gt;
and here's my client configuration(ubuntu GNU/Linux):&lt;br /&gt;
 remote 192.168.1.1&lt;br /&gt;
 client&lt;br /&gt;
 dev tap&lt;br /&gt;
 nobind&lt;br /&gt;
 tls-client&lt;br /&gt;
 ca /home/ubu/ca.crt&lt;br /&gt;
 cert /home/ubu/ubu.crt&lt;br /&gt;
 key /home/ubu/ubu.key&lt;br /&gt;
 pull&lt;br /&gt;
 verb 4&lt;br /&gt;
 remote-cert-tls server&lt;br /&gt;
 #auth-user-pass&lt;br /&gt;
in order to make it work do this on the server:&lt;br /&gt;
 /usr/loca/sbin/openvpn server.conf&lt;br /&gt;
 ifconfig tap0 10.0.0.1&lt;br /&gt;
on the client:&lt;br /&gt;
 openvpn client.conf&lt;br /&gt;
 route del default&lt;br /&gt;
 route add default gw 10.0.0.1 tap0&lt;br /&gt;
 &lt;br /&gt;
if you put wireshark on the client's wireless interface you'll see only udp packet from and to the openvpn port...so it works...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
in order to make our openvpn start at boot we will add this to /etc/rc.conf:&lt;br /&gt;
 #openvpn&lt;br /&gt;
 cloned_interfaces=&amp;quot;bridge0 tap0&amp;quot;&lt;br /&gt;
 autobridge_interfaces=&amp;quot;bridge0&amp;quot;&lt;br /&gt;
 autobridge_bridge0=&amp;quot;tap0 ral0&amp;quot;&lt;br /&gt;
 openvpn_if=&amp;quot;tap&amp;quot;&lt;br /&gt;
 openvpn_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 openvpn_configfile=&amp;quot;/usr/local/etc/openvpn/openvpn.conf&amp;quot;&lt;br /&gt;
 ifconfig_tap0=&amp;quot;inet 10.0.0.1 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
 ifconfig_bridge0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
so here's our final rc.conf:&lt;br /&gt;
 # -- sysinstall generated deltas -- # Mon Oct  6 04:45:53 2008&lt;br /&gt;
 # Created: Mon Oct  6 04:45:53 2008&lt;br /&gt;
 # Enable network daemons for user convenience.&lt;br /&gt;
 # Please make all changes to this file, not to /etc/defaults/rc.conf.&lt;br /&gt;
 # This file now contains just the overrides from /etc/defaults/rc.conf.&lt;br /&gt;
 keymap=&amp;quot;us.iso&amp;quot;&lt;br /&gt;
 sshd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 ifconfig_rl0=&amp;quot;DHCP&amp;quot;&lt;br /&gt;
 ifconfig_ral0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&amp;quot;&lt;br /&gt;
 gateway_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_type=&amp;quot;OPEN&amp;quot;&lt;br /&gt;
 natd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 natd_interface=&amp;quot;rl0&amp;quot;&lt;br /&gt;
 natd_flags=&amp;quot;&amp;quot;&lt;br /&gt;
 #defaultrouter=&amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
 dnsmasq_enable=&amp;quot;YES&amp;quot; &lt;br /&gt;
 &lt;br /&gt;
 #openvpn&lt;br /&gt;
 cloned_interfaces=&amp;quot;bridge0 tap0&amp;quot;&lt;br /&gt;
 autobridge_interfaces=&amp;quot;bridge0&amp;quot;&lt;br /&gt;
 autobridge_bridge0=&amp;quot;tap0 ral0&amp;quot;&lt;br /&gt;
 openvpn_if=&amp;quot;tap&amp;quot;&lt;br /&gt;
 openvpn_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 openvpn_configfile=&amp;quot;/usr/local/etc/openvpn/openvpn.conf&amp;quot;&lt;br /&gt;
 ifconfig_tap0=&amp;quot;inet 10.0.0.1 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
 ifconfig_bridge0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD for Servers]]&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/AccessPoint</id>
		<title>AccessPoint</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/AccessPoint"/>
				<updated>2008-06-04T21:08:49Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* Installation and Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
FreeBSD is very well suited for use as a wifi access point as it has 'master mode' support for a variety of wifi network cards, out of the box.  Some of these include ralink and Atheros cards.&lt;br /&gt;
&lt;br /&gt;
There are many difficulties setting up a wireless network access point on linux.  Some of the problems(with non madwifi cards) include:&lt;br /&gt;
*You must use a kernel that is yet-to-be released (2.6.26-rc4).&lt;br /&gt;
*You must patch the kernel. [http://johannes.sipsolutions.net/patches/kernel/all/LATEST/006-allow-ap-vlan-modes.patch Download Patch]&lt;br /&gt;
*You must compile a recent libnl(I used libnl-1.1-r1, on Gentoo) against the custom kernel.&lt;br /&gt;
*On Gentoo you need to copy nl80211.h from your kenrel directory to /usr/include/linux&lt;br /&gt;
*Finally, you need to compile a git version of hostapd...&lt;br /&gt;
&lt;br /&gt;
All of the above steps must be completed for maximum support of various wireless network cards.  Most other sets are fairly similar to those on FreeBSD.&lt;br /&gt;
&lt;br /&gt;
On this Howto we will assume that your modem gives you a dhcp address,see [[AccessPoint using pppoe]] if you need to setup PPPOE&lt;br /&gt;
&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;br /&gt;
&lt;br /&gt;
== Installation and Configuration==&lt;br /&gt;
* Install FreeBSD as usual.  This example uses FreeBSD 7.0.&lt;br /&gt;
* Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;sshd_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If you have a DHCP-enabled modem, you can add the following to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig_rl0=&amp;quot;DHCP&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;Note, make certain you replace rl0 with your wired network interface name.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Wireless===&lt;br /&gt;
To configure the wireless card, the following commands need to be executed:&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig ral0 inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that, in the [http://www.freebsd.org/handbook FreeBSD Handbook], inet is placed incorrectly.  Also, make certain to include a channel number.  Without it, I was unable to get this working.&lt;br /&gt;
&lt;br /&gt;
Next, try to associate to the new AP from a client. If something goes wrong (i.e. ping doesn't work), look to dmesg for debugging output.  Specifically, look for association messages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, if you can see the wireless network, and can ping it, simply add the following to /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig_ral0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Useful Association Commands ====&lt;br /&gt;
&lt;br /&gt;
Under GNU/Linux type as root(remplacing wlan0 by your wifi card interface name):&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig wlan0 up&lt;br /&gt;
 iwlist wlan0 scan&lt;br /&gt;
 iwconfig wlan0 essid &amp;quot;freebsdap&amp;quot;&lt;br /&gt;
 ifconfig wlan0 192.168.1.100 netmask 255.255.255.0&lt;br /&gt;
 ping 192.168.1.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
Under FreeBSD type as root(remplacing ral0 by your wifi card interface name):&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig ral0 up&lt;br /&gt;
 ifconfig ral0 list scan&lt;br /&gt;
 ifconfig ral0 inet 192.168.1.100 netmask 255.255.255.0 ssid freebsdap&lt;br /&gt;
 ping 192.168.1.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DNS and DHCP===&lt;br /&gt;
Once the wireless AP is working, we can install DNS and DHCP servers.  For simplicity, we will use dnsmasq.  As root, execute the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /usr/ports/dns/dnsmasq &amp;amp;&amp;amp; make config &amp;amp;&amp;amp; make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the configuration menu, deselect the followingn options:&lt;br /&gt;
* ipv6&lt;br /&gt;
* dbus&lt;br /&gt;
&lt;br /&gt;
Once installed, we need to configure dnsmasq:&lt;br /&gt;
&lt;br /&gt;
Edit /usr/local/etc/dnsmasq.conf with your favorite editor and add the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;# filter what we send upstream&lt;br /&gt;
domain-needed&lt;br /&gt;
bogus-priv&lt;br /&gt;
filterwin2k&lt;br /&gt;
localise-queries&lt;br /&gt;
 &lt;br /&gt;
# allow /etc/hosts and dhcp lookups via *.lan&lt;br /&gt;
local=/lan/&lt;br /&gt;
domain=workgroup&lt;br /&gt;
expand-hosts&lt;br /&gt;
#resolv-file=/tmp/resolv.conf.auto&lt;br /&gt;
 &lt;br /&gt;
dhcp-authoritative&lt;br /&gt;
#dhcp-leasefile=/tmp/dhcp.leases&lt;br /&gt;
 &lt;br /&gt;
# use /etc/ethers for static hosts; same format as --dhcp-host&lt;br /&gt;
# &amp;lt;hwaddr&amp;gt; &amp;lt;ipaddr&amp;gt;&lt;br /&gt;
read-ethers&lt;br /&gt;
 &lt;br /&gt;
# other useful options:&lt;br /&gt;
# default route(s):&lt;br /&gt;
dhcp-option=3,192.168.1.1&lt;br /&gt;
#    dns server(s):&lt;br /&gt;
dhcp-option=6,192.168.1.1&lt;br /&gt;
&lt;br /&gt;
dhcp-range=192.168.1.100,192.168.1.255,255.255.255.0,12h&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The option, read-ethers, permits you to assign statics IPs to certain MAC addresses.  Edit /etc/ethers with entries as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;00:14:85:11:EF:02 192.168.1.106&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to give a DNS name to this entry, edit /etc/hosts and add an entry like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;192.168.1.106 Ralink&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To start your dnsmasq server at boot, add the following to /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;dnsmasq_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now test the wifi connection with any graphical tool (like NetworkManager in GNU/linux or even test it with a windows computer) you can even try to ping a website... but you will only get his ip and no response...that's because we didn't set up the NAT yet...&lt;br /&gt;
&lt;br /&gt;
==Nat and firewall==&lt;br /&gt;
in order to set the nat we will add this to /etc/rc.conf:(remplacing ral0 by your wired card(that is connected to the internet) interface name)::&lt;br /&gt;
 gateway_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_type=&amp;quot;OPEN&amp;quot;&lt;br /&gt;
 natd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 natd_interface=&amp;quot;rl0&amp;quot;&lt;br /&gt;
 natd_flags=&amp;quot;&amp;quot;&lt;br /&gt;
if you wish to redirect ports add this to natd_flags=&amp;quot;&amp;quot; in /etc/rc.conf:&lt;br /&gt;
 -redirect_port tcp 192.168.0.6:80 80&lt;br /&gt;
&lt;br /&gt;
now normally the access point should work...&lt;br /&gt;
&lt;br /&gt;
==OpenVPN==&lt;br /&gt;
===Introduction===&lt;br /&gt;
now that we have wireless we could choose between theses choices:&lt;br /&gt;
*having a full open wireless(not great for security)&lt;br /&gt;
*having a wpa wireless(not compatible with all drivers,devices doesn't always work),no guests...&lt;br /&gt;
*having an open wireless while encrypting the data sent to to wireless access point...yes that is possible...with the help of openvpn&lt;br /&gt;
&lt;br /&gt;
i chose the third possibility.&lt;br /&gt;
===installation===&lt;br /&gt;
here the commands to run in order to install openvpn:&lt;br /&gt;
 cd /usr/ports/security/openvpn&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
===configuration===&lt;br /&gt;
====EasyRsa====&lt;br /&gt;
install bash:&lt;br /&gt;
 cd /usr/ports/shells/bash&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 ln -s /usr/local/bin/bash /bin/bash &lt;br /&gt;
run theses commands:&lt;br /&gt;
 cp -r /usr/local/share/doc/openvpn/easy-rsa/2.0/ /root/easy-rsa-2.0&lt;br /&gt;
here we will copy it in order not to have our keys erased by an update...&lt;br /&gt;
then we will need bash run:&lt;br /&gt;
 /bin/bash&lt;br /&gt;
 cd /root/easy-rsa-2.0&lt;br /&gt;
then we will make the certificates:&lt;br /&gt;
modify the vars script in order to suit your needs,then run:&lt;br /&gt;
 source ./vars&lt;br /&gt;
 ./clean all&lt;br /&gt;
 ./build-ca ca&lt;br /&gt;
then we will build the server key:&lt;br /&gt;
 ./build-key-server server&lt;br /&gt;
then we will build the clients key:&lt;br /&gt;
 ./build-key client1&lt;br /&gt;
 ./build-key client2&lt;br /&gt;
then we genreate diffie helman parameters:&lt;br /&gt;
 ./build-dh&lt;br /&gt;
&lt;br /&gt;
in order to build a new client just do:&lt;br /&gt;
 source ./vars&lt;br /&gt;
 ./build-key client2&lt;br /&gt;
&lt;br /&gt;
then copy the keys at the keys location:&lt;br /&gt;
 cp -r keys /usr/local/etc/openvpn/keys&lt;br /&gt;
alternatively you can do the following:&lt;br /&gt;
 mkdir /usr/local/etc/openvpn/keys/&lt;br /&gt;
 cd /root/easy-rsa-2.0/keys&lt;br /&gt;
 cp ca.crt /usr/local/etc/openvpn/keys/ca.crt&lt;br /&gt;
 cp server.crt /usr/local/etc/openvpn/keys/server.crt&lt;br /&gt;
 cp server.key /usr/local/etc/openvpn/keys/server.key&lt;br /&gt;
 cp dh1024.pem /usr/local/etc/openvpn/keys/dh1024.pem&lt;br /&gt;
&lt;br /&gt;
====OpenVpn configuration====&lt;br /&gt;
We will first install all in test-mode that is to say not runnning at the boot,not running as daemon etc...&lt;br /&gt;
we will run theses commands:&lt;br /&gt;
 ifconfig tap0 destroy&lt;br /&gt;
 ifconfig bridge0 destroy&lt;br /&gt;
 ifconfig tun0 destroy&lt;br /&gt;
 ifconfig bridge0 create&lt;br /&gt;
 ifconfig tap0 create&lt;br /&gt;
 #remplace ral0 by your card interface name&lt;br /&gt;
 ifconfig bridge0 addm ral0 addm tap0 up&lt;br /&gt;
 ifconfig br0 192.168.1.1&lt;br /&gt;
then here's my server configuration for openvpn:&lt;br /&gt;
 ca /usr/local/etc/openvpn/keys/ca.crt&lt;br /&gt;
 cert /usr/local/etc/openvpn/keys/server.crt&lt;br /&gt;
 key /usr/local/etc/openvpn/keys/server.key&lt;br /&gt;
 dh /usr/local/etc/openvpn/keys/dh1024.pem&lt;br /&gt;
 dev tap&lt;br /&gt;
 # replace 10.0.0.1 with the VPN IP&lt;br /&gt;
 server-bridge 10.0.0.1 255.255.255.0 10.0.0.2 10.0.0.250&lt;br /&gt;
 keepalive 10 120&lt;br /&gt;
 client-to-client&lt;br /&gt;
 verb 3&lt;br /&gt;
 duplicate-cn&lt;br /&gt;
and here's my client configuration(ubuntu GNU/Linux):&lt;br /&gt;
 remote 192.168.1.1&lt;br /&gt;
 client&lt;br /&gt;
 dev tap&lt;br /&gt;
 nobind&lt;br /&gt;
 tls-client&lt;br /&gt;
 ca /home/ubu/ca.crt&lt;br /&gt;
 cert /home/ubu/ubu.crt&lt;br /&gt;
 key /home/ubu/ubu.key&lt;br /&gt;
 pull&lt;br /&gt;
 verb 4&lt;br /&gt;
 remote-cert-tls server&lt;br /&gt;
 #auth-user-pass&lt;br /&gt;
in order to make it work do this on the server:&lt;br /&gt;
 /usr/loca/sbin/openvpn server.conf&lt;br /&gt;
 ifconfig tap0 10.0.0.1&lt;br /&gt;
on the client:&lt;br /&gt;
 openvpn client.conf&lt;br /&gt;
 route del default&lt;br /&gt;
 route add default gw 10.0.0.1 tap0&lt;br /&gt;
 &lt;br /&gt;
if you put wireshark on the client's wireless interface you'll see only udp packet from and to the openvpn port...so it works...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
in order to make our openvpn start at boot we will add this to /etc/rc.conf:&lt;br /&gt;
 #openvpn&lt;br /&gt;
 cloned_interfaces=&amp;quot;bridge0 tap0&amp;quot;&lt;br /&gt;
 autobridge_interfaces=&amp;quot;bridge0&amp;quot;&lt;br /&gt;
 autobridge_bridge0=&amp;quot;tap0 ral0&amp;quot;&lt;br /&gt;
 openvpn_if=&amp;quot;tap&amp;quot;&lt;br /&gt;
 openvpn_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 openvpn_configfile=&amp;quot;/usr/local/etc/openvpn/openvpn.conf&amp;quot;&lt;br /&gt;
 ifconfig_tap0=&amp;quot;inet 10.0.0.1 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
 ifconfig_bridge0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
so here's our final rc.conf:&lt;br /&gt;
 # -- sysinstall generated deltas -- # Mon Oct  6 04:45:53 2008&lt;br /&gt;
 # Created: Mon Oct  6 04:45:53 2008&lt;br /&gt;
 # Enable network daemons for user convenience.&lt;br /&gt;
 # Please make all changes to this file, not to /etc/defaults/rc.conf.&lt;br /&gt;
 # This file now contains just the overrides from /etc/defaults/rc.conf.&lt;br /&gt;
 keymap=&amp;quot;us.iso&amp;quot;&lt;br /&gt;
 sshd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 ifconfig_rl0=&amp;quot;DHCP&amp;quot;&lt;br /&gt;
 ifconfig_ral0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&amp;quot;&lt;br /&gt;
 gateway_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_type=&amp;quot;OPEN&amp;quot;&lt;br /&gt;
 natd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 natd_interface=&amp;quot;rl0&amp;quot;&lt;br /&gt;
 natd_flags=&amp;quot;&amp;quot;&lt;br /&gt;
 #defaultrouter=&amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
 dnsmasq_enable=&amp;quot;YES&amp;quot; &lt;br /&gt;
 &lt;br /&gt;
 #openvpn&lt;br /&gt;
 cloned_interfaces=&amp;quot;bridge0 tap0&amp;quot;&lt;br /&gt;
 autobridge_interfaces=&amp;quot;bridge0&amp;quot;&lt;br /&gt;
 autobridge_bridge0=&amp;quot;tap0 ral0&amp;quot;&lt;br /&gt;
 openvpn_if=&amp;quot;tap&amp;quot;&lt;br /&gt;
 openvpn_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 openvpn_configfile=&amp;quot;/usr/local/etc/openvpn/openvpn.conf&amp;quot;&lt;br /&gt;
 ifconfig_tap0=&amp;quot;inet 10.0.0.1 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
 ifconfig_bridge0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD for Servers]]&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/AccessPoint</id>
		<title>AccessPoint</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/AccessPoint"/>
				<updated>2008-06-04T21:07:25Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
FreeBSD is very well suited for use as a wifi access point as it has 'master mode' support for a variety of wifi network cards, out of the box.  Some of these include ralink and Atheros cards.&lt;br /&gt;
&lt;br /&gt;
There are many difficulties setting up a wireless network access point on linux.  Some of the problems(with non madwifi cards) include:&lt;br /&gt;
*You must use a kernel that is yet-to-be released (2.6.26-rc4).&lt;br /&gt;
*You must patch the kernel. [http://johannes.sipsolutions.net/patches/kernel/all/LATEST/006-allow-ap-vlan-modes.patch Download Patch]&lt;br /&gt;
*You must compile a recent libnl(I used libnl-1.1-r1, on Gentoo) against the custom kernel.&lt;br /&gt;
*On Gentoo you need to copy nl80211.h from your kenrel directory to /usr/include/linux&lt;br /&gt;
*Finally, you need to compile a git version of hostapd...&lt;br /&gt;
&lt;br /&gt;
All of the above steps must be completed for maximum support of various wireless network cards.  Most other sets are fairly similar to those on FreeBSD.&lt;br /&gt;
&lt;br /&gt;
On this Howto we will assume that your modem gives you a dhcp address,see [[AccessPoint using pppoe]] if you need to setup PPPOE&lt;br /&gt;
&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;br /&gt;
&lt;br /&gt;
== Installation and Configuration==&lt;br /&gt;
* Install FreeBSD as usual.  This example uses FreeBSD 7.0.&lt;br /&gt;
* Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;sshd_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If you have a DHCP-enabled modem, you can add the following to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig_rl0=&amp;quot;DHCP&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;Note, make certain you replace rl0 with your wired network interface name.&amp;lt;/i&amp;gt;&lt;br /&gt;
If you don't use DHCP, we'll cover PPPOE later...&lt;br /&gt;
&lt;br /&gt;
===Wireless===&lt;br /&gt;
To configure the wireless card, the following commands need to be executed:&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig ral0 inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that, in the [http://www.freebsd.org/handbook FreeBSD Handbook], inet is placed incorrectly.  Also, make certain to include a channel number.  Without it, I was unable to get this working.&lt;br /&gt;
&lt;br /&gt;
Next, try to associate to the new AP from a client. If something goes wrong (i.e. ping doesn't work), look to dmesg for debugging output.  Specifically, look for association messages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, if you can see the wireless network, and can ping it, simply add the following to /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig_ral0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Useful Association Commands ====&lt;br /&gt;
&lt;br /&gt;
Under GNU/Linux type as root(remplacing wlan0 by your wifi card interface name):&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig wlan0 up&lt;br /&gt;
 iwlist wlan0 scan&lt;br /&gt;
 iwconfig wlan0 essid &amp;quot;freebsdap&amp;quot;&lt;br /&gt;
 ifconfig wlan0 192.168.1.100 netmask 255.255.255.0&lt;br /&gt;
 ping 192.168.1.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
Under FreeBSD type as root(remplacing ral0 by your wifi card interface name):&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig ral0 up&lt;br /&gt;
 ifconfig ral0 list scan&lt;br /&gt;
 ifconfig ral0 inet 192.168.1.100 netmask 255.255.255.0 ssid freebsdap&lt;br /&gt;
 ping 192.168.1.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DNS and DHCP===&lt;br /&gt;
Once the wireless AP is working, we can install DNS and DHCP servers.  For simplicity, we will use dnsmasq.  As root, execute the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /usr/ports/dns/dnsmasq &amp;amp;&amp;amp; make config &amp;amp;&amp;amp; make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the configuration menu, deselect the followingn options:&lt;br /&gt;
* ipv6&lt;br /&gt;
* dbus&lt;br /&gt;
&lt;br /&gt;
Once installed, we need to configure dnsmasq:&lt;br /&gt;
&lt;br /&gt;
Edit /usr/local/etc/dnsmasq.conf with your favorite editor and add the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;# filter what we send upstream&lt;br /&gt;
domain-needed&lt;br /&gt;
bogus-priv&lt;br /&gt;
filterwin2k&lt;br /&gt;
localise-queries&lt;br /&gt;
 &lt;br /&gt;
# allow /etc/hosts and dhcp lookups via *.lan&lt;br /&gt;
local=/lan/&lt;br /&gt;
domain=workgroup&lt;br /&gt;
expand-hosts&lt;br /&gt;
#resolv-file=/tmp/resolv.conf.auto&lt;br /&gt;
 &lt;br /&gt;
dhcp-authoritative&lt;br /&gt;
#dhcp-leasefile=/tmp/dhcp.leases&lt;br /&gt;
 &lt;br /&gt;
# use /etc/ethers for static hosts; same format as --dhcp-host&lt;br /&gt;
# &amp;lt;hwaddr&amp;gt; &amp;lt;ipaddr&amp;gt;&lt;br /&gt;
read-ethers&lt;br /&gt;
 &lt;br /&gt;
# other useful options:&lt;br /&gt;
# default route(s):&lt;br /&gt;
dhcp-option=3,192.168.1.1&lt;br /&gt;
#    dns server(s):&lt;br /&gt;
dhcp-option=6,192.168.1.1&lt;br /&gt;
&lt;br /&gt;
dhcp-range=192.168.1.100,192.168.1.255,255.255.255.0,12h&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The option, read-ethers, permits you to assign statics IPs to certain MAC addresses.  Edit /etc/ethers with entries as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;00:14:85:11:EF:02 192.168.1.106&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to give a DNS name to this entry, edit /etc/hosts and add an entry like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;192.168.1.106 Ralink&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To start your dnsmasq server at boot, add the following to /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;dnsmasq_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now test the wifi connection with any graphical tool (like NetworkManager in GNU/linux or even test it with a windows computer) you can even try to ping a website... but you will only get his ip and no response...that's because we didn't set up the NAT yet...&lt;br /&gt;
&lt;br /&gt;
==Nat and firewall==&lt;br /&gt;
in order to set the nat we will add this to /etc/rc.conf:(remplacing ral0 by your wired card(that is connected to the internet) interface name)::&lt;br /&gt;
 gateway_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_type=&amp;quot;OPEN&amp;quot;&lt;br /&gt;
 natd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 natd_interface=&amp;quot;rl0&amp;quot;&lt;br /&gt;
 natd_flags=&amp;quot;&amp;quot;&lt;br /&gt;
if you wish to redirect ports add this to natd_flags=&amp;quot;&amp;quot; in /etc/rc.conf:&lt;br /&gt;
 -redirect_port tcp 192.168.0.6:80 80&lt;br /&gt;
&lt;br /&gt;
now normally the access point should work...&lt;br /&gt;
&lt;br /&gt;
==OpenVPN==&lt;br /&gt;
===Introduction===&lt;br /&gt;
now that we have wireless we could choose between theses choices:&lt;br /&gt;
*having a full open wireless(not great for security)&lt;br /&gt;
*having a wpa wireless(not compatible with all drivers,devices doesn't always work),no guests...&lt;br /&gt;
*having an open wireless while encrypting the data sent to to wireless access point...yes that is possible...with the help of openvpn&lt;br /&gt;
&lt;br /&gt;
i chose the third possibility.&lt;br /&gt;
===installation===&lt;br /&gt;
here the commands to run in order to install openvpn:&lt;br /&gt;
 cd /usr/ports/security/openvpn&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
===configuration===&lt;br /&gt;
====EasyRsa====&lt;br /&gt;
install bash:&lt;br /&gt;
 cd /usr/ports/shells/bash&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 ln -s /usr/local/bin/bash /bin/bash &lt;br /&gt;
run theses commands:&lt;br /&gt;
 cp -r /usr/local/share/doc/openvpn/easy-rsa/2.0/ /root/easy-rsa-2.0&lt;br /&gt;
here we will copy it in order not to have our keys erased by an update...&lt;br /&gt;
then we will need bash run:&lt;br /&gt;
 /bin/bash&lt;br /&gt;
 cd /root/easy-rsa-2.0&lt;br /&gt;
then we will make the certificates:&lt;br /&gt;
modify the vars script in order to suit your needs,then run:&lt;br /&gt;
 source ./vars&lt;br /&gt;
 ./clean all&lt;br /&gt;
 ./build-ca ca&lt;br /&gt;
then we will build the server key:&lt;br /&gt;
 ./build-key-server server&lt;br /&gt;
then we will build the clients key:&lt;br /&gt;
 ./build-key client1&lt;br /&gt;
 ./build-key client2&lt;br /&gt;
then we genreate diffie helman parameters:&lt;br /&gt;
 ./build-dh&lt;br /&gt;
&lt;br /&gt;
in order to build a new client just do:&lt;br /&gt;
 source ./vars&lt;br /&gt;
 ./build-key client2&lt;br /&gt;
&lt;br /&gt;
then copy the keys at the keys location:&lt;br /&gt;
 cp -r keys /usr/local/etc/openvpn/keys&lt;br /&gt;
alternatively you can do the following:&lt;br /&gt;
 mkdir /usr/local/etc/openvpn/keys/&lt;br /&gt;
 cd /root/easy-rsa-2.0/keys&lt;br /&gt;
 cp ca.crt /usr/local/etc/openvpn/keys/ca.crt&lt;br /&gt;
 cp server.crt /usr/local/etc/openvpn/keys/server.crt&lt;br /&gt;
 cp server.key /usr/local/etc/openvpn/keys/server.key&lt;br /&gt;
 cp dh1024.pem /usr/local/etc/openvpn/keys/dh1024.pem&lt;br /&gt;
&lt;br /&gt;
====OpenVpn configuration====&lt;br /&gt;
We will first install all in test-mode that is to say not runnning at the boot,not running as daemon etc...&lt;br /&gt;
we will run theses commands:&lt;br /&gt;
 ifconfig tap0 destroy&lt;br /&gt;
 ifconfig bridge0 destroy&lt;br /&gt;
 ifconfig tun0 destroy&lt;br /&gt;
 ifconfig bridge0 create&lt;br /&gt;
 ifconfig tap0 create&lt;br /&gt;
 #remplace ral0 by your card interface name&lt;br /&gt;
 ifconfig bridge0 addm ral0 addm tap0 up&lt;br /&gt;
 ifconfig br0 192.168.1.1&lt;br /&gt;
then here's my server configuration for openvpn:&lt;br /&gt;
 ca /usr/local/etc/openvpn/keys/ca.crt&lt;br /&gt;
 cert /usr/local/etc/openvpn/keys/server.crt&lt;br /&gt;
 key /usr/local/etc/openvpn/keys/server.key&lt;br /&gt;
 dh /usr/local/etc/openvpn/keys/dh1024.pem&lt;br /&gt;
 dev tap&lt;br /&gt;
 # replace 10.0.0.1 with the VPN IP&lt;br /&gt;
 server-bridge 10.0.0.1 255.255.255.0 10.0.0.2 10.0.0.250&lt;br /&gt;
 keepalive 10 120&lt;br /&gt;
 client-to-client&lt;br /&gt;
 verb 3&lt;br /&gt;
 duplicate-cn&lt;br /&gt;
and here's my client configuration(ubuntu GNU/Linux):&lt;br /&gt;
 remote 192.168.1.1&lt;br /&gt;
 client&lt;br /&gt;
 dev tap&lt;br /&gt;
 nobind&lt;br /&gt;
 tls-client&lt;br /&gt;
 ca /home/ubu/ca.crt&lt;br /&gt;
 cert /home/ubu/ubu.crt&lt;br /&gt;
 key /home/ubu/ubu.key&lt;br /&gt;
 pull&lt;br /&gt;
 verb 4&lt;br /&gt;
 remote-cert-tls server&lt;br /&gt;
 #auth-user-pass&lt;br /&gt;
in order to make it work do this on the server:&lt;br /&gt;
 /usr/loca/sbin/openvpn server.conf&lt;br /&gt;
 ifconfig tap0 10.0.0.1&lt;br /&gt;
on the client:&lt;br /&gt;
 openvpn client.conf&lt;br /&gt;
 route del default&lt;br /&gt;
 route add default gw 10.0.0.1 tap0&lt;br /&gt;
 &lt;br /&gt;
if you put wireshark on the client's wireless interface you'll see only udp packet from and to the openvpn port...so it works...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
in order to make our openvpn start at boot we will add this to /etc/rc.conf:&lt;br /&gt;
 #openvpn&lt;br /&gt;
 cloned_interfaces=&amp;quot;bridge0 tap0&amp;quot;&lt;br /&gt;
 autobridge_interfaces=&amp;quot;bridge0&amp;quot;&lt;br /&gt;
 autobridge_bridge0=&amp;quot;tap0 ral0&amp;quot;&lt;br /&gt;
 openvpn_if=&amp;quot;tap&amp;quot;&lt;br /&gt;
 openvpn_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 openvpn_configfile=&amp;quot;/usr/local/etc/openvpn/openvpn.conf&amp;quot;&lt;br /&gt;
 ifconfig_tap0=&amp;quot;inet 10.0.0.1 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
 ifconfig_bridge0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
so here's our final rc.conf:&lt;br /&gt;
 # -- sysinstall generated deltas -- # Mon Oct  6 04:45:53 2008&lt;br /&gt;
 # Created: Mon Oct  6 04:45:53 2008&lt;br /&gt;
 # Enable network daemons for user convenience.&lt;br /&gt;
 # Please make all changes to this file, not to /etc/defaults/rc.conf.&lt;br /&gt;
 # This file now contains just the overrides from /etc/defaults/rc.conf.&lt;br /&gt;
 keymap=&amp;quot;us.iso&amp;quot;&lt;br /&gt;
 sshd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 ifconfig_rl0=&amp;quot;DHCP&amp;quot;&lt;br /&gt;
 ifconfig_ral0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&amp;quot;&lt;br /&gt;
 gateway_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_type=&amp;quot;OPEN&amp;quot;&lt;br /&gt;
 natd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 natd_interface=&amp;quot;rl0&amp;quot;&lt;br /&gt;
 natd_flags=&amp;quot;&amp;quot;&lt;br /&gt;
 #defaultrouter=&amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
 dnsmasq_enable=&amp;quot;YES&amp;quot; &lt;br /&gt;
 &lt;br /&gt;
 #openvpn&lt;br /&gt;
 cloned_interfaces=&amp;quot;bridge0 tap0&amp;quot;&lt;br /&gt;
 autobridge_interfaces=&amp;quot;bridge0&amp;quot;&lt;br /&gt;
 autobridge_bridge0=&amp;quot;tap0 ral0&amp;quot;&lt;br /&gt;
 openvpn_if=&amp;quot;tap&amp;quot;&lt;br /&gt;
 openvpn_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 openvpn_configfile=&amp;quot;/usr/local/etc/openvpn/openvpn.conf&amp;quot;&lt;br /&gt;
 ifconfig_tap0=&amp;quot;inet 10.0.0.1 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
 ifconfig_bridge0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD for Servers]]&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/AccessPoint</id>
		<title>AccessPoint</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/AccessPoint"/>
				<updated>2008-06-04T21:07:07Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
FreeBSD is very well suited for use as a wifi access point as it has 'master mode' support for a variety of wifi network cards, out of the box.  Some of these include ralink and Atheros cards.&lt;br /&gt;
&lt;br /&gt;
There are many difficulties setting up a wireless network access point on linux.  Some of the problems(with non madwifi cards) include:&lt;br /&gt;
*You must use a kernel that is yet-to-be released (2.6.26-rc4).&lt;br /&gt;
*You must patch the kernel. [http://johannes.sipsolutions.net/patches/kernel/all/LATEST/006-allow-ap-vlan-modes.patch Download Patch]&lt;br /&gt;
*You must compile a recent libnl(I used libnl-1.1-r1, on Gentoo) against the custom kernel.&lt;br /&gt;
*On Gentoo you need to copy nl80211.h from your kenrel directory to /usr/include/linux&lt;br /&gt;
*Finally, you need to compile a git version of hostapd...&lt;br /&gt;
&lt;br /&gt;
All of the above steps must be completed for maximum support of various wireless network cards.  Most other sets are fairly similar to those on FreeBSD.&lt;br /&gt;
&lt;br /&gt;
On this Howto we will assume that your modem gives you a dhcp address,see [[AccessPoint using pppoe]]&lt;br /&gt;
&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;br /&gt;
&lt;br /&gt;
== Installation and Configuration==&lt;br /&gt;
* Install FreeBSD as usual.  This example uses FreeBSD 7.0.&lt;br /&gt;
* Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;sshd_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If you have a DHCP-enabled modem, you can add the following to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig_rl0=&amp;quot;DHCP&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;Note, make certain you replace rl0 with your wired network interface name.&amp;lt;/i&amp;gt;&lt;br /&gt;
If you don't use DHCP, we'll cover PPPOE later...&lt;br /&gt;
&lt;br /&gt;
===Wireless===&lt;br /&gt;
To configure the wireless card, the following commands need to be executed:&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig ral0 inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that, in the [http://www.freebsd.org/handbook FreeBSD Handbook], inet is placed incorrectly.  Also, make certain to include a channel number.  Without it, I was unable to get this working.&lt;br /&gt;
&lt;br /&gt;
Next, try to associate to the new AP from a client. If something goes wrong (i.e. ping doesn't work), look to dmesg for debugging output.  Specifically, look for association messages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, if you can see the wireless network, and can ping it, simply add the following to /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig_ral0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Useful Association Commands ====&lt;br /&gt;
&lt;br /&gt;
Under GNU/Linux type as root(remplacing wlan0 by your wifi card interface name):&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig wlan0 up&lt;br /&gt;
 iwlist wlan0 scan&lt;br /&gt;
 iwconfig wlan0 essid &amp;quot;freebsdap&amp;quot;&lt;br /&gt;
 ifconfig wlan0 192.168.1.100 netmask 255.255.255.0&lt;br /&gt;
 ping 192.168.1.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
Under FreeBSD type as root(remplacing ral0 by your wifi card interface name):&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig ral0 up&lt;br /&gt;
 ifconfig ral0 list scan&lt;br /&gt;
 ifconfig ral0 inet 192.168.1.100 netmask 255.255.255.0 ssid freebsdap&lt;br /&gt;
 ping 192.168.1.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DNS and DHCP===&lt;br /&gt;
Once the wireless AP is working, we can install DNS and DHCP servers.  For simplicity, we will use dnsmasq.  As root, execute the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /usr/ports/dns/dnsmasq &amp;amp;&amp;amp; make config &amp;amp;&amp;amp; make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the configuration menu, deselect the followingn options:&lt;br /&gt;
* ipv6&lt;br /&gt;
* dbus&lt;br /&gt;
&lt;br /&gt;
Once installed, we need to configure dnsmasq:&lt;br /&gt;
&lt;br /&gt;
Edit /usr/local/etc/dnsmasq.conf with your favorite editor and add the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;# filter what we send upstream&lt;br /&gt;
domain-needed&lt;br /&gt;
bogus-priv&lt;br /&gt;
filterwin2k&lt;br /&gt;
localise-queries&lt;br /&gt;
 &lt;br /&gt;
# allow /etc/hosts and dhcp lookups via *.lan&lt;br /&gt;
local=/lan/&lt;br /&gt;
domain=workgroup&lt;br /&gt;
expand-hosts&lt;br /&gt;
#resolv-file=/tmp/resolv.conf.auto&lt;br /&gt;
 &lt;br /&gt;
dhcp-authoritative&lt;br /&gt;
#dhcp-leasefile=/tmp/dhcp.leases&lt;br /&gt;
 &lt;br /&gt;
# use /etc/ethers for static hosts; same format as --dhcp-host&lt;br /&gt;
# &amp;lt;hwaddr&amp;gt; &amp;lt;ipaddr&amp;gt;&lt;br /&gt;
read-ethers&lt;br /&gt;
 &lt;br /&gt;
# other useful options:&lt;br /&gt;
# default route(s):&lt;br /&gt;
dhcp-option=3,192.168.1.1&lt;br /&gt;
#    dns server(s):&lt;br /&gt;
dhcp-option=6,192.168.1.1&lt;br /&gt;
&lt;br /&gt;
dhcp-range=192.168.1.100,192.168.1.255,255.255.255.0,12h&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The option, read-ethers, permits you to assign statics IPs to certain MAC addresses.  Edit /etc/ethers with entries as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;00:14:85:11:EF:02 192.168.1.106&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to give a DNS name to this entry, edit /etc/hosts and add an entry like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;192.168.1.106 Ralink&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To start your dnsmasq server at boot, add the following to /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;dnsmasq_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now test the wifi connection with any graphical tool (like NetworkManager in GNU/linux or even test it with a windows computer) you can even try to ping a website... but you will only get his ip and no response...that's because we didn't set up the NAT yet...&lt;br /&gt;
&lt;br /&gt;
==Nat and firewall==&lt;br /&gt;
in order to set the nat we will add this to /etc/rc.conf:(remplacing ral0 by your wired card(that is connected to the internet) interface name)::&lt;br /&gt;
 gateway_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_type=&amp;quot;OPEN&amp;quot;&lt;br /&gt;
 natd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 natd_interface=&amp;quot;rl0&amp;quot;&lt;br /&gt;
 natd_flags=&amp;quot;&amp;quot;&lt;br /&gt;
if you wish to redirect ports add this to natd_flags=&amp;quot;&amp;quot; in /etc/rc.conf:&lt;br /&gt;
 -redirect_port tcp 192.168.0.6:80 80&lt;br /&gt;
&lt;br /&gt;
now normally the access point should work...&lt;br /&gt;
&lt;br /&gt;
==OpenVPN==&lt;br /&gt;
===Introduction===&lt;br /&gt;
now that we have wireless we could choose between theses choices:&lt;br /&gt;
*having a full open wireless(not great for security)&lt;br /&gt;
*having a wpa wireless(not compatible with all drivers,devices doesn't always work),no guests...&lt;br /&gt;
*having an open wireless while encrypting the data sent to to wireless access point...yes that is possible...with the help of openvpn&lt;br /&gt;
&lt;br /&gt;
i chose the third possibility.&lt;br /&gt;
===installation===&lt;br /&gt;
here the commands to run in order to install openvpn:&lt;br /&gt;
 cd /usr/ports/security/openvpn&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
===configuration===&lt;br /&gt;
====EasyRsa====&lt;br /&gt;
install bash:&lt;br /&gt;
 cd /usr/ports/shells/bash&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 ln -s /usr/local/bin/bash /bin/bash &lt;br /&gt;
run theses commands:&lt;br /&gt;
 cp -r /usr/local/share/doc/openvpn/easy-rsa/2.0/ /root/easy-rsa-2.0&lt;br /&gt;
here we will copy it in order not to have our keys erased by an update...&lt;br /&gt;
then we will need bash run:&lt;br /&gt;
 /bin/bash&lt;br /&gt;
 cd /root/easy-rsa-2.0&lt;br /&gt;
then we will make the certificates:&lt;br /&gt;
modify the vars script in order to suit your needs,then run:&lt;br /&gt;
 source ./vars&lt;br /&gt;
 ./clean all&lt;br /&gt;
 ./build-ca ca&lt;br /&gt;
then we will build the server key:&lt;br /&gt;
 ./build-key-server server&lt;br /&gt;
then we will build the clients key:&lt;br /&gt;
 ./build-key client1&lt;br /&gt;
 ./build-key client2&lt;br /&gt;
then we genreate diffie helman parameters:&lt;br /&gt;
 ./build-dh&lt;br /&gt;
&lt;br /&gt;
in order to build a new client just do:&lt;br /&gt;
 source ./vars&lt;br /&gt;
 ./build-key client2&lt;br /&gt;
&lt;br /&gt;
then copy the keys at the keys location:&lt;br /&gt;
 cp -r keys /usr/local/etc/openvpn/keys&lt;br /&gt;
alternatively you can do the following:&lt;br /&gt;
 mkdir /usr/local/etc/openvpn/keys/&lt;br /&gt;
 cd /root/easy-rsa-2.0/keys&lt;br /&gt;
 cp ca.crt /usr/local/etc/openvpn/keys/ca.crt&lt;br /&gt;
 cp server.crt /usr/local/etc/openvpn/keys/server.crt&lt;br /&gt;
 cp server.key /usr/local/etc/openvpn/keys/server.key&lt;br /&gt;
 cp dh1024.pem /usr/local/etc/openvpn/keys/dh1024.pem&lt;br /&gt;
&lt;br /&gt;
====OpenVpn configuration====&lt;br /&gt;
We will first install all in test-mode that is to say not runnning at the boot,not running as daemon etc...&lt;br /&gt;
we will run theses commands:&lt;br /&gt;
 ifconfig tap0 destroy&lt;br /&gt;
 ifconfig bridge0 destroy&lt;br /&gt;
 ifconfig tun0 destroy&lt;br /&gt;
 ifconfig bridge0 create&lt;br /&gt;
 ifconfig tap0 create&lt;br /&gt;
 #remplace ral0 by your card interface name&lt;br /&gt;
 ifconfig bridge0 addm ral0 addm tap0 up&lt;br /&gt;
 ifconfig br0 192.168.1.1&lt;br /&gt;
then here's my server configuration for openvpn:&lt;br /&gt;
 ca /usr/local/etc/openvpn/keys/ca.crt&lt;br /&gt;
 cert /usr/local/etc/openvpn/keys/server.crt&lt;br /&gt;
 key /usr/local/etc/openvpn/keys/server.key&lt;br /&gt;
 dh /usr/local/etc/openvpn/keys/dh1024.pem&lt;br /&gt;
 dev tap&lt;br /&gt;
 # replace 10.0.0.1 with the VPN IP&lt;br /&gt;
 server-bridge 10.0.0.1 255.255.255.0 10.0.0.2 10.0.0.250&lt;br /&gt;
 keepalive 10 120&lt;br /&gt;
 client-to-client&lt;br /&gt;
 verb 3&lt;br /&gt;
 duplicate-cn&lt;br /&gt;
and here's my client configuration(ubuntu GNU/Linux):&lt;br /&gt;
 remote 192.168.1.1&lt;br /&gt;
 client&lt;br /&gt;
 dev tap&lt;br /&gt;
 nobind&lt;br /&gt;
 tls-client&lt;br /&gt;
 ca /home/ubu/ca.crt&lt;br /&gt;
 cert /home/ubu/ubu.crt&lt;br /&gt;
 key /home/ubu/ubu.key&lt;br /&gt;
 pull&lt;br /&gt;
 verb 4&lt;br /&gt;
 remote-cert-tls server&lt;br /&gt;
 #auth-user-pass&lt;br /&gt;
in order to make it work do this on the server:&lt;br /&gt;
 /usr/loca/sbin/openvpn server.conf&lt;br /&gt;
 ifconfig tap0 10.0.0.1&lt;br /&gt;
on the client:&lt;br /&gt;
 openvpn client.conf&lt;br /&gt;
 route del default&lt;br /&gt;
 route add default gw 10.0.0.1 tap0&lt;br /&gt;
 &lt;br /&gt;
if you put wireshark on the client's wireless interface you'll see only udp packet from and to the openvpn port...so it works...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
in order to make our openvpn start at boot we will add this to /etc/rc.conf:&lt;br /&gt;
 #openvpn&lt;br /&gt;
 cloned_interfaces=&amp;quot;bridge0 tap0&amp;quot;&lt;br /&gt;
 autobridge_interfaces=&amp;quot;bridge0&amp;quot;&lt;br /&gt;
 autobridge_bridge0=&amp;quot;tap0 ral0&amp;quot;&lt;br /&gt;
 openvpn_if=&amp;quot;tap&amp;quot;&lt;br /&gt;
 openvpn_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 openvpn_configfile=&amp;quot;/usr/local/etc/openvpn/openvpn.conf&amp;quot;&lt;br /&gt;
 ifconfig_tap0=&amp;quot;inet 10.0.0.1 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
 ifconfig_bridge0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
so here's our final rc.conf:&lt;br /&gt;
 # -- sysinstall generated deltas -- # Mon Oct  6 04:45:53 2008&lt;br /&gt;
 # Created: Mon Oct  6 04:45:53 2008&lt;br /&gt;
 # Enable network daemons for user convenience.&lt;br /&gt;
 # Please make all changes to this file, not to /etc/defaults/rc.conf.&lt;br /&gt;
 # This file now contains just the overrides from /etc/defaults/rc.conf.&lt;br /&gt;
 keymap=&amp;quot;us.iso&amp;quot;&lt;br /&gt;
 sshd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 ifconfig_rl0=&amp;quot;DHCP&amp;quot;&lt;br /&gt;
 ifconfig_ral0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&amp;quot;&lt;br /&gt;
 gateway_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_type=&amp;quot;OPEN&amp;quot;&lt;br /&gt;
 natd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 natd_interface=&amp;quot;rl0&amp;quot;&lt;br /&gt;
 natd_flags=&amp;quot;&amp;quot;&lt;br /&gt;
 #defaultrouter=&amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
 dnsmasq_enable=&amp;quot;YES&amp;quot; &lt;br /&gt;
 &lt;br /&gt;
 #openvpn&lt;br /&gt;
 cloned_interfaces=&amp;quot;bridge0 tap0&amp;quot;&lt;br /&gt;
 autobridge_interfaces=&amp;quot;bridge0&amp;quot;&lt;br /&gt;
 autobridge_bridge0=&amp;quot;tap0 ral0&amp;quot;&lt;br /&gt;
 openvpn_if=&amp;quot;tap&amp;quot;&lt;br /&gt;
 openvpn_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 openvpn_configfile=&amp;quot;/usr/local/etc/openvpn/openvpn.conf&amp;quot;&lt;br /&gt;
 ifconfig_tap0=&amp;quot;inet 10.0.0.1 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
 ifconfig_bridge0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD for Servers]]&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/AccessPoint</id>
		<title>AccessPoint</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/AccessPoint"/>
				<updated>2008-06-04T21:05:02Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
FreeBSD is very well suited for use as a wifi access point as it has 'master mode' support for a variety of wifi network cards, out of the box.  Some of these include ralink and Atheros cards.&lt;br /&gt;
&lt;br /&gt;
There are many difficulties setting up a wireless network access point on linux.  Some of the problems(with non madwifi cards) include:&lt;br /&gt;
*You must use a kernel that is yet-to-be released (2.6.26-rc4).&lt;br /&gt;
*You must patch the kernel. [http://johannes.sipsolutions.net/patches/kernel/all/LATEST/006-allow-ap-vlan-modes.patch Download Patch]&lt;br /&gt;
*You must compile a recent libnl(I used libnl-1.1-r1, on Gentoo) against the custom kernel.&lt;br /&gt;
*On Gentoo you need to copy nl80211.h from your kenrel directory to /usr/include/linux&lt;br /&gt;
*Finally, you need to compile a git version of hostapd...&lt;br /&gt;
&lt;br /&gt;
All of the above steps must be completed for maximum support of various wireless network cards.  Most other sets are fairly similar to those on FreeBSD.&lt;br /&gt;
&lt;br /&gt;
==The hardware==&lt;br /&gt;
For my setup, and the instructions included here, I used:&lt;br /&gt;
*2 Realtech PCI 10/100 cards, on FreeBSD. These cards are recognized as rl0 and rl1. (Perhaps there is the possibility to use interfaces aliasing, but as i had 2 cards...)&lt;br /&gt;
*1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.&lt;br /&gt;
&lt;br /&gt;
== Installation and Configuration==&lt;br /&gt;
* Install FreeBSD as usual.  This example uses FreeBSD 7.0.&lt;br /&gt;
* Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;sshd_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
* If you have a DHCP-enabled modem, you can add the following to your /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig_rl0=&amp;quot;DHCP&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;Note, make certain you replace rl0 with your wired network interface name.&amp;lt;/i&amp;gt;&lt;br /&gt;
If you don't use DHCP, we'll cover PPPOE later...&lt;br /&gt;
&lt;br /&gt;
===Wireless===&lt;br /&gt;
To configure the wireless card, the following commands need to be executed:&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig ral0 inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that, in the [http://www.freebsd.org/handbook FreeBSD Handbook], inet is placed incorrectly.  Also, make certain to include a channel number.  Without it, I was unable to get this working.&lt;br /&gt;
&lt;br /&gt;
Next, try to associate to the new AP from a client. If something goes wrong (i.e. ping doesn't work), look to dmesg for debugging output.  Specifically, look for association messages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, if you can see the wireless network, and can ping it, simply add the following to /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig_ral0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Useful Association Commands ====&lt;br /&gt;
&lt;br /&gt;
Under GNU/Linux type as root(remplacing wlan0 by your wifi card interface name):&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig wlan0 up&lt;br /&gt;
 iwlist wlan0 scan&lt;br /&gt;
 iwconfig wlan0 essid &amp;quot;freebsdap&amp;quot;&lt;br /&gt;
 ifconfig wlan0 192.168.1.100 netmask 255.255.255.0&lt;br /&gt;
 ping 192.168.1.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
Under FreeBSD type as root(remplacing ral0 by your wifi card interface name):&lt;br /&gt;
&amp;lt;pre&amp;gt;ifconfig ral0 up&lt;br /&gt;
 ifconfig ral0 list scan&lt;br /&gt;
 ifconfig ral0 inet 192.168.1.100 netmask 255.255.255.0 ssid freebsdap&lt;br /&gt;
 ping 192.168.1.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DNS and DHCP===&lt;br /&gt;
Once the wireless AP is working, we can install DNS and DHCP servers.  For simplicity, we will use dnsmasq.  As root, execute the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /usr/ports/dns/dnsmasq &amp;amp;&amp;amp; make config &amp;amp;&amp;amp; make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the configuration menu, deselect the followingn options:&lt;br /&gt;
* ipv6&lt;br /&gt;
* dbus&lt;br /&gt;
&lt;br /&gt;
Once installed, we need to configure dnsmasq:&lt;br /&gt;
&lt;br /&gt;
Edit /usr/local/etc/dnsmasq.conf with your favorite editor and add the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;# filter what we send upstream&lt;br /&gt;
domain-needed&lt;br /&gt;
bogus-priv&lt;br /&gt;
filterwin2k&lt;br /&gt;
localise-queries&lt;br /&gt;
 &lt;br /&gt;
# allow /etc/hosts and dhcp lookups via *.lan&lt;br /&gt;
local=/lan/&lt;br /&gt;
domain=workgroup&lt;br /&gt;
expand-hosts&lt;br /&gt;
#resolv-file=/tmp/resolv.conf.auto&lt;br /&gt;
 &lt;br /&gt;
dhcp-authoritative&lt;br /&gt;
#dhcp-leasefile=/tmp/dhcp.leases&lt;br /&gt;
 &lt;br /&gt;
# use /etc/ethers for static hosts; same format as --dhcp-host&lt;br /&gt;
# &amp;lt;hwaddr&amp;gt; &amp;lt;ipaddr&amp;gt;&lt;br /&gt;
read-ethers&lt;br /&gt;
 &lt;br /&gt;
# other useful options:&lt;br /&gt;
# default route(s):&lt;br /&gt;
dhcp-option=3,192.168.1.1&lt;br /&gt;
#    dns server(s):&lt;br /&gt;
dhcp-option=6,192.168.1.1&lt;br /&gt;
&lt;br /&gt;
dhcp-range=192.168.1.100,192.168.1.255,255.255.255.0,12h&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The option, read-ethers, permits you to assign statics IPs to certain MAC addresses.  Edit /etc/ethers with entries as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;00:14:85:11:EF:02 192.168.1.106&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to give a DNS name to this entry, edit /etc/hosts and add an entry like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;192.168.1.106 Ralink&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To start your dnsmasq server at boot, add the following to /etc/rc.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;dnsmasq_enable=&amp;quot;YES&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now test the wifi connection with any graphical tool (like NetworkManager in GNU/linux or even test it with a windows computer) you can even try to ping a website... but you will only get his ip and no response...that's because we didn't set up the NAT yet...&lt;br /&gt;
&lt;br /&gt;
==Nat and firewall==&lt;br /&gt;
in order to set the nat we will add this to /etc/rc.conf:(remplacing ral0 by your wired card(that is connected to the internet) interface name)::&lt;br /&gt;
 gateway_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_type=&amp;quot;OPEN&amp;quot;&lt;br /&gt;
 natd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 natd_interface=&amp;quot;rl0&amp;quot;&lt;br /&gt;
 natd_flags=&amp;quot;&amp;quot;&lt;br /&gt;
if you wish to redirect ports add this to natd_flags=&amp;quot;&amp;quot; in /etc/rc.conf:&lt;br /&gt;
 -redirect_port tcp 192.168.0.6:80 80&lt;br /&gt;
&lt;br /&gt;
now normally the access point should work...&lt;br /&gt;
&lt;br /&gt;
==OpenVPN==&lt;br /&gt;
===Introduction===&lt;br /&gt;
now that we have wireless we could choose between theses choices:&lt;br /&gt;
*having a full open wireless(not great for security)&lt;br /&gt;
*having a wpa wireless(not compatible with all drivers,devices doesn't always work),no guests...&lt;br /&gt;
*having an open wireless while encrypting the data sent to to wireless access point...yes that is possible...with the help of openvpn&lt;br /&gt;
&lt;br /&gt;
i chose the third possibility.&lt;br /&gt;
===installation===&lt;br /&gt;
here the commands to run in order to install openvpn:&lt;br /&gt;
 cd /usr/ports/security/openvpn&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
===configuration===&lt;br /&gt;
====EasyRsa====&lt;br /&gt;
install bash:&lt;br /&gt;
 cd /usr/ports/shells/bash&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 ln -s /usr/local/bin/bash /bin/bash &lt;br /&gt;
run theses commands:&lt;br /&gt;
 cp -r /usr/local/share/doc/openvpn/easy-rsa/2.0/ /root/easy-rsa-2.0&lt;br /&gt;
here we will copy it in order not to have our keys erased by an update...&lt;br /&gt;
then we will need bash run:&lt;br /&gt;
 /bin/bash&lt;br /&gt;
 cd /root/easy-rsa-2.0&lt;br /&gt;
then we will make the certificates:&lt;br /&gt;
modify the vars script in order to suit your needs,then run:&lt;br /&gt;
 source ./vars&lt;br /&gt;
 ./clean all&lt;br /&gt;
 ./build-ca ca&lt;br /&gt;
then we will build the server key:&lt;br /&gt;
 ./build-key-server server&lt;br /&gt;
then we will build the clients key:&lt;br /&gt;
 ./build-key client1&lt;br /&gt;
 ./build-key client2&lt;br /&gt;
then we genreate diffie helman parameters:&lt;br /&gt;
 ./build-dh&lt;br /&gt;
&lt;br /&gt;
in order to build a new client just do:&lt;br /&gt;
 source ./vars&lt;br /&gt;
 ./build-key client2&lt;br /&gt;
&lt;br /&gt;
then copy the keys at the keys location:&lt;br /&gt;
 cp -r keys /usr/local/etc/openvpn/keys&lt;br /&gt;
alternatively you can do the following:&lt;br /&gt;
 mkdir /usr/local/etc/openvpn/keys/&lt;br /&gt;
 cd /root/easy-rsa-2.0/keys&lt;br /&gt;
 cp ca.crt /usr/local/etc/openvpn/keys/ca.crt&lt;br /&gt;
 cp server.crt /usr/local/etc/openvpn/keys/server.crt&lt;br /&gt;
 cp server.key /usr/local/etc/openvpn/keys/server.key&lt;br /&gt;
 cp dh1024.pem /usr/local/etc/openvpn/keys/dh1024.pem&lt;br /&gt;
&lt;br /&gt;
====OpenVpn configuration====&lt;br /&gt;
We will first install all in test-mode that is to say not runnning at the boot,not running as daemon etc...&lt;br /&gt;
we will run theses commands:&lt;br /&gt;
 ifconfig tap0 destroy&lt;br /&gt;
 ifconfig bridge0 destroy&lt;br /&gt;
 ifconfig tun0 destroy&lt;br /&gt;
 ifconfig bridge0 create&lt;br /&gt;
 ifconfig tap0 create&lt;br /&gt;
 #remplace ral0 by your card interface name&lt;br /&gt;
 ifconfig bridge0 addm ral0 addm tap0 up&lt;br /&gt;
 ifconfig br0 192.168.1.1&lt;br /&gt;
then here's my server configuration for openvpn:&lt;br /&gt;
 ca /usr/local/etc/openvpn/keys/ca.crt&lt;br /&gt;
 cert /usr/local/etc/openvpn/keys/server.crt&lt;br /&gt;
 key /usr/local/etc/openvpn/keys/server.key&lt;br /&gt;
 dh /usr/local/etc/openvpn/keys/dh1024.pem&lt;br /&gt;
 dev tap&lt;br /&gt;
 # replace 10.0.0.1 with the VPN IP&lt;br /&gt;
 server-bridge 10.0.0.1 255.255.255.0 10.0.0.2 10.0.0.250&lt;br /&gt;
 keepalive 10 120&lt;br /&gt;
 client-to-client&lt;br /&gt;
 verb 3&lt;br /&gt;
 duplicate-cn&lt;br /&gt;
and here's my client configuration(ubuntu GNU/Linux):&lt;br /&gt;
 remote 192.168.1.1&lt;br /&gt;
 client&lt;br /&gt;
 dev tap&lt;br /&gt;
 nobind&lt;br /&gt;
 tls-client&lt;br /&gt;
 ca /home/ubu/ca.crt&lt;br /&gt;
 cert /home/ubu/ubu.crt&lt;br /&gt;
 key /home/ubu/ubu.key&lt;br /&gt;
 pull&lt;br /&gt;
 verb 4&lt;br /&gt;
 remote-cert-tls server&lt;br /&gt;
 #auth-user-pass&lt;br /&gt;
in order to make it work do this on the server:&lt;br /&gt;
 /usr/loca/sbin/openvpn server.conf&lt;br /&gt;
 ifconfig tap0 10.0.0.1&lt;br /&gt;
on the client:&lt;br /&gt;
 openvpn client.conf&lt;br /&gt;
 route del default&lt;br /&gt;
 route add default gw 10.0.0.1 tap0&lt;br /&gt;
 &lt;br /&gt;
if you put wireshark on the client's wireless interface you'll see only udp packet from and to the openvpn port...so it works...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
in order to make our openvpn start at boot we will add this to /etc/rc.conf:&lt;br /&gt;
 #openvpn&lt;br /&gt;
 cloned_interfaces=&amp;quot;bridge0 tap0&amp;quot;&lt;br /&gt;
 autobridge_interfaces=&amp;quot;bridge0&amp;quot;&lt;br /&gt;
 autobridge_bridge0=&amp;quot;tap0 ral0&amp;quot;&lt;br /&gt;
 openvpn_if=&amp;quot;tap&amp;quot;&lt;br /&gt;
 openvpn_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 openvpn_configfile=&amp;quot;/usr/local/etc/openvpn/openvpn.conf&amp;quot;&lt;br /&gt;
 ifconfig_tap0=&amp;quot;inet 10.0.0.1 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
 ifconfig_bridge0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
so here's our final rc.conf:&lt;br /&gt;
 # -- sysinstall generated deltas -- # Mon Oct  6 04:45:53 2008&lt;br /&gt;
 # Created: Mon Oct  6 04:45:53 2008&lt;br /&gt;
 # Enable network daemons for user convenience.&lt;br /&gt;
 # Please make all changes to this file, not to /etc/defaults/rc.conf.&lt;br /&gt;
 # This file now contains just the overrides from /etc/defaults/rc.conf.&lt;br /&gt;
 keymap=&amp;quot;us.iso&amp;quot;&lt;br /&gt;
 sshd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 ifconfig_rl0=&amp;quot;DHCP&amp;quot;&lt;br /&gt;
 ifconfig_ral0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&amp;quot;&lt;br /&gt;
 gateway_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_type=&amp;quot;OPEN&amp;quot;&lt;br /&gt;
 natd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 natd_interface=&amp;quot;rl0&amp;quot;&lt;br /&gt;
 natd_flags=&amp;quot;&amp;quot;&lt;br /&gt;
 #defaultrouter=&amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
 dnsmasq_enable=&amp;quot;YES&amp;quot; &lt;br /&gt;
 &lt;br /&gt;
 #openvpn&lt;br /&gt;
 cloned_interfaces=&amp;quot;bridge0 tap0&amp;quot;&lt;br /&gt;
 autobridge_interfaces=&amp;quot;bridge0&amp;quot;&lt;br /&gt;
 autobridge_bridge0=&amp;quot;tap0 ral0&amp;quot;&lt;br /&gt;
 openvpn_if=&amp;quot;tap&amp;quot;&lt;br /&gt;
 openvpn_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 openvpn_configfile=&amp;quot;/usr/local/etc/openvpn/openvpn.conf&amp;quot;&lt;br /&gt;
 ifconfig_tap0=&amp;quot;inet 10.0.0.1 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
 ifconfig_bridge0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD for Servers]]&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Talk:AccessPoint</id>
		<title>Talk:AccessPoint</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Talk:AccessPoint"/>
				<updated>2008-06-04T21:04:15Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;i'll add the ppp section later...&lt;br /&gt;
&lt;br /&gt;
== recommendation ==&lt;br /&gt;
&lt;br /&gt;
remove the linux section at the beginning. looks petty and doesn't add anything to the article. Sell BSD, don't try to pull a Hillary on Linux. Also, maybe a security section? I don't do a lot of BSD these days so can't add anything myself. &lt;br /&gt;
&lt;br /&gt;
--[[User:Dave|Dave]] 19:24, 31 May 2008 (EDT)&lt;br /&gt;
i don't have anything against GNU/Linux...i was just explaining as a GNU/Linux user why i chose FreeBSD...simply because there was no way to make a 100% Free software Access Point with GNU/Linux using the cards i had because:&lt;br /&gt;
*or you find some very old cards that i wasn't able to find...and that have firmware bugs(a friend has one with a firmware bug)&lt;br /&gt;
*or you use madwifi(i don't like the proprietary hal)&lt;br /&gt;
*or you use a broadcom with the setup described...complicated and needs a firmware&lt;br /&gt;
*or you use FreeBSD with a ralink card...the best way to go&lt;br /&gt;
[[User:GNUtoo|GNUtoo]] 17:04, 4 June 2008 (EDT)&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Talk:AccessPoint</id>
		<title>Talk:AccessPoint</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Talk:AccessPoint"/>
				<updated>2008-06-04T21:03:11Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;i'll add the ppp section later...&lt;br /&gt;
&lt;br /&gt;
== recommendation ==&lt;br /&gt;
&lt;br /&gt;
remove the linux section at the beginning. looks petty and doesn't add anything to the article. Sell BSD, don't try to pull a Hillary on Linux. Also, maybe a security section? I don't do a lot of BSD these days so can't add anything myself. &lt;br /&gt;
&lt;br /&gt;
--[[User:Dave|Dave]] 19:24, 31 May 2008 (EDT)&lt;br /&gt;
 i don't have anything against GNU/Linux...i was just explaining as a GNU/Linux user why i chose FreeBSD...simply because there was no way to make a 100% Free software Access Point with GNU/Linux using the cards i had because:&lt;br /&gt;
 *or you find some very old cards that i wasn't able to find...&lt;br /&gt;
 *or you use madwifi(i don't like the proprietary hal)&lt;br /&gt;
 *or you use a broadcom with the setup described...complicated and needs a firmware&lt;br /&gt;
 *or you use FreeBSD with a ralink card...the best way to go&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/AccessPoint</id>
		<title>AccessPoint</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/AccessPoint"/>
				<updated>2008-05-31T22:22:39Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
FreeBSD is very well suited to be used as an access point,because it has out of the box support of the master mode for a variety of cards such as ralink,atheros cards.&lt;br /&gt;
Under GNU/Linux you have to:&lt;br /&gt;
*use a kernel that is not out yet(2.6.26-rc4)&lt;br /&gt;
*patch the kernel with the patch named allow-ap-vlan-modes.patch from http://johannes.sipsolutions.net/patches/kernel/all/LATEST/&lt;br /&gt;
*compile a recent libnl(i used libnl-1.1-r1 in gentoo) against the kernel&lt;br /&gt;
*in gentoo you need to copy nl80211.h from your kenrel directory to /usr/include/linux&lt;br /&gt;
*then finally you need to compile a git version of hostapd...&lt;br /&gt;
you have to do all that only in order to have the wifi card working as access point(otherwise the setup is pretty similar to FreeBSD)&lt;br /&gt;
at the end i got a system that is working with broadcom not ralink ones(made my computer freeze)&lt;br /&gt;
under FreeBSD it's a lot more easy and more stable(we don't use git or patches)&lt;br /&gt;
&lt;br /&gt;
==The hardware==&lt;br /&gt;
i used:&lt;br /&gt;
*2 realtech pci 10/100 cards,in FreeBSD they are recognized as rl0 and rl1(maybe there is the possibility to use interfaces aliasing but as i had 2 cards...)&lt;br /&gt;
*a ralink rt2500 pci card,in FreeBSD it's recognized as ral0&lt;br /&gt;
&lt;br /&gt;
==The installation and configuration==&lt;br /&gt;
*install FreeBSD as usual(i used FreeBSD 7.0)&lt;br /&gt;
*enable ssh logins during the installation or add this in your /etc/rc.conf:&lt;br /&gt;
 sshd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
*if you have got a dhcp modem you can use add the following in your /etc/rc.conf(remplacing ral0 by your wired card interface name)&lt;br /&gt;
 ifconfig_rl0=&amp;quot;DHCP&amp;quot;&lt;br /&gt;
otherwise we'll see pppoe later...&lt;br /&gt;
===Wireless===&lt;br /&gt;
*then type the following command as root(remplacing ral0 by your wifi card interface name):&lt;br /&gt;
 ifconfig ral0 inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&lt;br /&gt;
note that in the FreeBSD handbook inet is placed incorrectly,pay also attention to the channel 4...i tried it without it and it didn't work&lt;br /&gt;
then try to associate with a client running an operating system such as *BSD or GNU/Linux and ping it:&lt;br /&gt;
if something goes wrong(ping doesn't work) simply type dmesg and look for message about your wifi card(such as associations messages)&lt;br /&gt;
under GNU/Linux type as root(remplacing wlan0 by your wifi card interface name):&lt;br /&gt;
 ifconfig wlan0 up&lt;br /&gt;
 iwlist wlan0 scan&lt;br /&gt;
 iwconfig wlan0 essid &amp;quot;freebsdap&amp;quot;&lt;br /&gt;
 ifconfig wlan0 192.168.1.100 netmask 255.255.255.0&lt;br /&gt;
 ping 192.168.1.1&lt;br /&gt;
under FreeBSD type as root(remplacing ral0 by your wifi card interface name):&lt;br /&gt;
 ifconfig ral0 up&lt;br /&gt;
 ifconfig ral0 list scan&lt;br /&gt;
 ifconfig ral0 inet 192.168.1.100 netmask 255.255.255.0 ssid freebsdap&lt;br /&gt;
 ping 192.168.1.1&lt;br /&gt;
then if you can see the wireless and can ping it simply add the following to /etc/rc.conf:&lt;br /&gt;
 ifconfig_ral0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&amp;quot;&lt;br /&gt;
===dns and dhcp===&lt;br /&gt;
your wireless is now working...so we can install a dns and dhcp server...&lt;br /&gt;
for simplicity we will use dnsmasq&lt;br /&gt;
type the following as root:&lt;br /&gt;
 cd /usr/ports/dns/dnsmasq&lt;br /&gt;
 make config&lt;br /&gt;
then unselect ipv6 unless you need it&lt;br /&gt;
and unselect dbus because we won't use it&lt;br /&gt;
then type the following as root:&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
then we will need to configure dnsmasq:&lt;br /&gt;
edit /usr/local/etc/dnsmasq.conf with your favorite editor and add the following:&lt;br /&gt;
 # filter what we send upstream&lt;br /&gt;
 domain-needed&lt;br /&gt;
 bogus-priv&lt;br /&gt;
 filterwin2k&lt;br /&gt;
 localise-queries&lt;br /&gt;
 &lt;br /&gt;
 # allow /etc/hosts and dhcp lookups via *.lan&lt;br /&gt;
 local=/lan/&lt;br /&gt;
 domain=workgroup&lt;br /&gt;
 expand-hosts&lt;br /&gt;
 #resolv-file=/tmp/resolv.conf.auto&lt;br /&gt;
 &lt;br /&gt;
 dhcp-authoritative&lt;br /&gt;
 #dhcp-leasefile=/tmp/dhcp.leases&lt;br /&gt;
 &lt;br /&gt;
 # use /etc/ethers for static hosts; same format as --dhcp-host&lt;br /&gt;
 # &amp;lt;hwaddr&amp;gt; &amp;lt;ipaddr&amp;gt;&lt;br /&gt;
 read-ethers&lt;br /&gt;
 &lt;br /&gt;
 # other useful options:&lt;br /&gt;
 # default route(s):&lt;br /&gt;
 dhcp-option=3,192.168.1.1&lt;br /&gt;
 #    dns server(s):&lt;br /&gt;
 dhcp-option=6,192.168.1.1&lt;br /&gt;
&lt;br /&gt;
 dhcp-range=192.168.1.100,192.168.1.255,255.255.255.0,12h&lt;br /&gt;
the file don't need to be explained but read-ethers...&lt;br /&gt;
read ethers permit you to assign static ip to certain mac address&lt;br /&gt;
so edit /etc/ethers with entries like this:&lt;br /&gt;
 00:14:85:11:EF:02 192.168.1.106&lt;br /&gt;
and in order to give a dns name to this entry edit /etc/hosts and add an entry like this:&lt;br /&gt;
 192.168.1.106 Ralink&lt;br /&gt;
&lt;br /&gt;
then in order to start your dnsmasq server at boot you need to add the following to /etc/rc.conf:&lt;br /&gt;
dnsmasq_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
you can now test the wifi connection with any graphical tool(like NetworkManager in GNU/linux or even test it with a windows computer)&lt;br /&gt;
you can even try to ping a website...but you will only get his ip and no response...that's because we didn't set up the NAT yet...&lt;br /&gt;
&lt;br /&gt;
==Nat and firewall==&lt;br /&gt;
in order to set the nat we will add this to /etc/rc.conf:(remplacing ral0 by your wired card(that is connected to the internet) interface name)::&lt;br /&gt;
 gateway_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_type=&amp;quot;OPEN&amp;quot;&lt;br /&gt;
 natd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 natd_interface=&amp;quot;rl0&amp;quot;&lt;br /&gt;
 natd_flags=&amp;quot;&amp;quot;&lt;br /&gt;
if you wish to redirect ports add this to natd_flags=&amp;quot;&amp;quot; in /etc/rc.conf:&lt;br /&gt;
 -redirect_port tcp 192.168.0.6:80 80&lt;br /&gt;
&lt;br /&gt;
now normally the access point should work...&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD for Servers]]&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/AccessPoint</id>
		<title>AccessPoint</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/AccessPoint"/>
				<updated>2008-05-31T22:17:22Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
FreeBSD is very well suited to be used as an access point,because it has out of the box support of the master mode for a variety of cards such as ralink,atheros cards.&lt;br /&gt;
Under GNU/Linux you have to:&lt;br /&gt;
*use a kernel that is not out yet(2.6.26-rc4)&lt;br /&gt;
*patch the kernel with the patch named allow-ap-vlan-modes.patch from http://johannes.sipsolutions.net/patches/kernel/all/LATEST/&lt;br /&gt;
*compile a recent libnl(i used libnl-1.1-r1 in gentoo) against the kernel&lt;br /&gt;
*in gentoo you need to copy nl80211.h from your kenrel directory to /usr/include/linux&lt;br /&gt;
*then finally you need to compile a git version of hostapd...&lt;br /&gt;
you have to do all that only in order to have the wifi card working as access point(otherwise the setup is pretty similar to FreeBSD)&lt;br /&gt;
at the end i got a system that is working with broadcom not ralink ones(made my computer freeze)&lt;br /&gt;
under FreeBSD it's a lot more easy and more stable(we don't use git or patches)&lt;br /&gt;
&lt;br /&gt;
==The hardware==&lt;br /&gt;
i used:&lt;br /&gt;
*2 realtech pci 10/100 cards,in FreeBSD they are recognized as rl0 and rl1(maybe there is the possibility to use interfaces aliasing but as i had 2 cards...)&lt;br /&gt;
*a ralink rt2500 pci card,in FreeBSD it's recognized as ral0&lt;br /&gt;
&lt;br /&gt;
==The installation and configuration==&lt;br /&gt;
*install FreeBSD as usual(i used FreeBSD 7.0)&lt;br /&gt;
*enable ssh logins during the installation or add this in your /etc/rc.conf:&lt;br /&gt;
 sshd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
*if you have got a dhcp modem you can use add the following in your /etc/rc.conf(remplacing ral0 by your wired card interface name)&lt;br /&gt;
 ifconfig_rl0=&amp;quot;DHCP&amp;quot;&lt;br /&gt;
otherwise we'll see pppoe later...&lt;br /&gt;
===Wireless===&lt;br /&gt;
*then type the following command as root(remplacing ral0 by your wifi card interface name):&lt;br /&gt;
 ifconfig ral0 inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&lt;br /&gt;
note that in the FreeBSD handbook inet is placed incorrectly,pay also attention to the channel 4...i tried it without it and it didn't work&lt;br /&gt;
then try to associate with a client running an operating system such as *BSD or GNU/Linux and ping it:&lt;br /&gt;
if something goes wrong(ping doesn't work) simply type dmesg and look for message about your wifi card(such as associations messages)&lt;br /&gt;
under GNU/Linux type as root(remplacing wlan0 by your wifi card interface name):&lt;br /&gt;
 ifconfig wlan0 up&lt;br /&gt;
 iwlist wlan0 scan&lt;br /&gt;
 iwconfig wlan0 essid &amp;quot;freebsdap&amp;quot;&lt;br /&gt;
 ifconfig wlan0 192.168.1.100 netmask 255.255.255.0&lt;br /&gt;
 ping 192.168.1.1&lt;br /&gt;
under FreeBSD type as root(remplacing ral0 by your wifi card interface name):&lt;br /&gt;
 ifconfig ral0 up&lt;br /&gt;
 ifconfig ral0 list scan&lt;br /&gt;
 ifconfig ral0 inet 192.168.1.100 netmask 255.255.255.0 ssid freebsdap&lt;br /&gt;
 ping 192.168.1.1&lt;br /&gt;
then if you can see the wireless and can ping it simply add the following to /etc/rc.conf:&lt;br /&gt;
 ifconfig_ral0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&amp;quot;&lt;br /&gt;
===dns and dhcp===&lt;br /&gt;
your wireless is now working...so we can install a dns and dhcp server...&lt;br /&gt;
for simplicity we will use dnsmasq&lt;br /&gt;
type the following as root:&lt;br /&gt;
 cd /usr/ports/dns/dnsmasq&lt;br /&gt;
 make config&lt;br /&gt;
then unselect ipv6 unless you need it&lt;br /&gt;
and unselect dbus because we won't use it&lt;br /&gt;
then type the following as root:&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
then we will need to configure dnsmasq:&lt;br /&gt;
edit /usr/local/etc/dnsmasq.conf with your favorite editor and add the following:&lt;br /&gt;
 # filter what we send upstream&lt;br /&gt;
 domain-needed&lt;br /&gt;
 bogus-priv&lt;br /&gt;
 filterwin2k&lt;br /&gt;
 localise-queries&lt;br /&gt;
 &lt;br /&gt;
 # allow /etc/hosts and dhcp lookups via *.lan&lt;br /&gt;
 local=/lan/&lt;br /&gt;
 domain=workgroup&lt;br /&gt;
 expand-hosts&lt;br /&gt;
 #resolv-file=/tmp/resolv.conf.auto&lt;br /&gt;
 &lt;br /&gt;
 dhcp-authoritative&lt;br /&gt;
 #dhcp-leasefile=/tmp/dhcp.leases&lt;br /&gt;
 &lt;br /&gt;
 # use /etc/ethers for static hosts; same format as --dhcp-host&lt;br /&gt;
 # &amp;lt;hwaddr&amp;gt; &amp;lt;ipaddr&amp;gt;&lt;br /&gt;
 read-ethers&lt;br /&gt;
 &lt;br /&gt;
 # other useful options:&lt;br /&gt;
 # default route(s):&lt;br /&gt;
 dhcp-option=3,192.168.1.1&lt;br /&gt;
 #    dns server(s):&lt;br /&gt;
 dhcp-option=6,192.168.1.1&lt;br /&gt;
&lt;br /&gt;
 dhcp-range=192.168.1.100,192.168.1.255,255.255.255.0,12h&lt;br /&gt;
the file don't need to be explained but read-ethers...&lt;br /&gt;
read ethers permit you to assign static ip to certain mac address&lt;br /&gt;
so edit /etc/ethers with entries like this:&lt;br /&gt;
 00:14:85:11:EF:02 192.168.1.106&lt;br /&gt;
and in order to give a dns name to this entry edit /etc/hosts and add an entry like this:&lt;br /&gt;
 192.168.1.106 Ralink&lt;br /&gt;
&lt;br /&gt;
then in order to start your dnsmasq server at boot you need to add the following to /etc/rc.conf:&lt;br /&gt;
dnsmasq_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
you can now test the wifi connection with any graphical tool(like NetworkManager in GNU/linux or even test it with a windows computer)&lt;br /&gt;
you can even try to ping a website...but you will only get his ip and no response...that's because we didn't set up the NAT yet...&lt;br /&gt;
&lt;br /&gt;
==Nat and firewall==&lt;br /&gt;
in order to set the nat we will add this to /etc/rc.conf:(remplacing ral0 by your wired card(that is connected to the internet) interface name)::&lt;br /&gt;
 gateway_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_type=&amp;quot;OPEN&amp;quot;&lt;br /&gt;
 natd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 natd_interface=&amp;quot;rl0&amp;quot;&lt;br /&gt;
 natd_flags=&amp;quot;&amp;quot;&lt;br /&gt;
if you wish to redirect ports add this to natd_flags=&amp;quot;&amp;quot; in /etc/rc.conf:&lt;br /&gt;
 -redirect_port tcp 192.168.0.6:80 80&lt;br /&gt;
&lt;br /&gt;
now normally the access point should work...&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Talk:AccessPoint</id>
		<title>Talk:AccessPoint</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Talk:AccessPoint"/>
				<updated>2008-05-31T22:15:54Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;i'll add the ppp section later...&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/AccessPoint</id>
		<title>AccessPoint</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/AccessPoint"/>
				<updated>2008-05-31T22:14:50Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: /* Nat and firewall */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
FreeBSD is very well suited to be used as an access point,because it has out of the box support of the master mode for a variety of cards such as ralink,atheros cards.&lt;br /&gt;
Under GNU/Linux you have to:&lt;br /&gt;
*use a kernel that is not out yet(2.6.26-rc4)&lt;br /&gt;
*patch the kernel with the patch named allow-ap-vlan-modes.patch from http://johannes.sipsolutions.net/patches/kernel/all/LATEST/&lt;br /&gt;
*compile a recent libnl(i used libnl-1.1-r1 in gentoo) against the kernel&lt;br /&gt;
*in gentoo you need to copy nl80211.h from your kenrel directory to /usr/include/linux&lt;br /&gt;
*then finally you need to compile a git version of hostapd...&lt;br /&gt;
at the end i got a system that is working with broadcom not ralink ones(made my computer freeze)&lt;br /&gt;
only in order to have the wifi card working as access point...&lt;br /&gt;
under FreeBSD it's a lot more easy and more stable(we don't use git or patches)&lt;br /&gt;
&lt;br /&gt;
==The hardware==&lt;br /&gt;
i used:&lt;br /&gt;
*2 realtech pci 10/100 cards,in FreeBSD they are recognized as rl0 and rl1(maybe there is the possibility to use interfaces aliasing but as i had 2 cards...)&lt;br /&gt;
*a ralink rt2500 pci card,in FreeBSD it's recognized as ral0&lt;br /&gt;
&lt;br /&gt;
==The installation and configuration==&lt;br /&gt;
*install FreeBSD as usual(i used FreeBSD 7.0)&lt;br /&gt;
*enable ssh logins during the installation or add this in your /etc/rc.conf:&lt;br /&gt;
 sshd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
*if you have got a dhcp modem you can use add the following in your /etc/rc.conf(remplacing ral0 by your wired card interface name)&lt;br /&gt;
 ifconfig_rl0=&amp;quot;DHCP&amp;quot;&lt;br /&gt;
otherwise we'll see pppoe later...&lt;br /&gt;
===Wireless===&lt;br /&gt;
*then type the following command as root(remplacing ral0 by your wifi card interface name):&lt;br /&gt;
 ifconfig ral0 inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&lt;br /&gt;
note that in the FreeBSD handbook inet is placed incorrectly,pay also attention to the channel 4...i tried it without it and it didn't work&lt;br /&gt;
then try to associate with a client running an operating system such as *BSD or GNU/Linux and ping it:&lt;br /&gt;
if something goes wrong(ping doesn't work) simply type dmesg and look for message about your wifi card(such as associations messages)&lt;br /&gt;
under GNU/Linux type as root(remplacing wlan0 by your wifi card interface name):&lt;br /&gt;
 ifconfig wlan0 up&lt;br /&gt;
 iwlist wlan0 scan&lt;br /&gt;
 iwconfig wlan0 essid &amp;quot;freebsdap&amp;quot;&lt;br /&gt;
 ifconfig wlan0 192.168.1.100 netmask 255.255.255.0&lt;br /&gt;
 ping 192.168.1.1&lt;br /&gt;
under FreeBSD type as root(remplacing ral0 by your wifi card interface name):&lt;br /&gt;
 ifconfig ral0 up&lt;br /&gt;
 ifconfig ral0 list scan&lt;br /&gt;
 ifconfig ral0 inet 192.168.1.100 netmask 255.255.255.0 ssid freebsdap&lt;br /&gt;
 ping 192.168.1.1&lt;br /&gt;
then if you can see the wireless and can ping it simply add the following to /etc/rc.conf:&lt;br /&gt;
 ifconfig_ral0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&amp;quot;&lt;br /&gt;
===dns and dhcp===&lt;br /&gt;
your wireless is now working...so we can install a dns and dhcp server...&lt;br /&gt;
for simplicity we will use dnsmasq&lt;br /&gt;
type the following as root:&lt;br /&gt;
 cd /usr/ports/dns/dnsmasq&lt;br /&gt;
 make config&lt;br /&gt;
then unselect ipv6 unless you need it&lt;br /&gt;
and unselect dbus because we won't use it&lt;br /&gt;
then type the following as root:&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
then we will need to configure dnsmasq:&lt;br /&gt;
edit /usr/local/etc/dnsmasq.conf with your favorite editor and add the following:&lt;br /&gt;
 # filter what we send upstream&lt;br /&gt;
 domain-needed&lt;br /&gt;
 bogus-priv&lt;br /&gt;
 filterwin2k&lt;br /&gt;
 localise-queries&lt;br /&gt;
 &lt;br /&gt;
 # allow /etc/hosts and dhcp lookups via *.lan&lt;br /&gt;
 local=/lan/&lt;br /&gt;
 domain=workgroup&lt;br /&gt;
 expand-hosts&lt;br /&gt;
 #resolv-file=/tmp/resolv.conf.auto&lt;br /&gt;
 &lt;br /&gt;
 dhcp-authoritative&lt;br /&gt;
 #dhcp-leasefile=/tmp/dhcp.leases&lt;br /&gt;
 &lt;br /&gt;
 # use /etc/ethers for static hosts; same format as --dhcp-host&lt;br /&gt;
 # &amp;lt;hwaddr&amp;gt; &amp;lt;ipaddr&amp;gt;&lt;br /&gt;
 read-ethers&lt;br /&gt;
 &lt;br /&gt;
 # other useful options:&lt;br /&gt;
 # default route(s):&lt;br /&gt;
 dhcp-option=3,192.168.1.1&lt;br /&gt;
 #    dns server(s):&lt;br /&gt;
 dhcp-option=6,192.168.1.1&lt;br /&gt;
&lt;br /&gt;
 dhcp-range=192.168.1.100,192.168.1.255,255.255.255.0,12h&lt;br /&gt;
the file don't need to be explained but read-ethers...&lt;br /&gt;
read ethers permit you to assign static ip to certain mac address&lt;br /&gt;
so edit /etc/ethers with entries like this:&lt;br /&gt;
 00:14:85:11:EF:02 192.168.1.106&lt;br /&gt;
and in order to give a dns name to this entry edit /etc/hosts and add an entry like this:&lt;br /&gt;
 192.168.1.106 Ralink&lt;br /&gt;
&lt;br /&gt;
then in order to start your dnsmasq server at boot you need to add the following to /etc/rc.conf:&lt;br /&gt;
dnsmasq_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
you can now test the wifi connection with any graphical tool(like NetworkManager in GNU/linux or even test it with a windows computer)&lt;br /&gt;
you can even try to ping a website...but you will only get his ip and no response...that's because we didn't set up the NAT yet...&lt;br /&gt;
&lt;br /&gt;
==Nat and firewall==&lt;br /&gt;
in order to set the nat we will add this to /etc/rc.conf:(remplacing ral0 by your wired card(that is connected to the internet) interface name)::&lt;br /&gt;
 gateway_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_type=&amp;quot;OPEN&amp;quot;&lt;br /&gt;
 natd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 natd_interface=&amp;quot;rl0&amp;quot;&lt;br /&gt;
 natd_flags=&amp;quot;&amp;quot;&lt;br /&gt;
if you wish to redirect ports add this to natd_flags=&amp;quot;&amp;quot; in /etc/rc.conf:&lt;br /&gt;
 -redirect_port tcp 192.168.0.6:80 80&lt;br /&gt;
&lt;br /&gt;
now normally the access point should work...&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/AccessPoint</id>
		<title>AccessPoint</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/AccessPoint"/>
				<updated>2008-05-31T22:11:54Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
FreeBSD is very well suited to be used as an access point,because it has out of the box support of the master mode for a variety of cards such as ralink,atheros cards.&lt;br /&gt;
Under GNU/Linux you have to:&lt;br /&gt;
*use a kernel that is not out yet(2.6.26-rc4)&lt;br /&gt;
*patch the kernel with the patch named allow-ap-vlan-modes.patch from http://johannes.sipsolutions.net/patches/kernel/all/LATEST/&lt;br /&gt;
*compile a recent libnl(i used libnl-1.1-r1 in gentoo) against the kernel&lt;br /&gt;
*in gentoo you need to copy nl80211.h from your kenrel directory to /usr/include/linux&lt;br /&gt;
*then finally you need to compile a git version of hostapd...&lt;br /&gt;
at the end i got a system that is working with broadcom not ralink ones(made my computer freeze)&lt;br /&gt;
only in order to have the wifi card working as access point...&lt;br /&gt;
under FreeBSD it's a lot more easy and more stable(we don't use git or patches)&lt;br /&gt;
&lt;br /&gt;
==The hardware==&lt;br /&gt;
i used:&lt;br /&gt;
*2 realtech pci 10/100 cards,in FreeBSD they are recognized as rl0 and rl1(maybe there is the possibility to use interfaces aliasing but as i had 2 cards...)&lt;br /&gt;
*a ralink rt2500 pci card,in FreeBSD it's recognized as ral0&lt;br /&gt;
&lt;br /&gt;
==The installation and configuration==&lt;br /&gt;
*install FreeBSD as usual(i used FreeBSD 7.0)&lt;br /&gt;
*enable ssh logins during the installation or add this in your /etc/rc.conf:&lt;br /&gt;
 sshd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
*if you have got a dhcp modem you can use add the following in your /etc/rc.conf(remplacing ral0 by your wired card interface name)&lt;br /&gt;
 ifconfig_rl0=&amp;quot;DHCP&amp;quot;&lt;br /&gt;
otherwise we'll see pppoe later...&lt;br /&gt;
===Wireless===&lt;br /&gt;
*then type the following command as root(remplacing ral0 by your wifi card interface name):&lt;br /&gt;
 ifconfig ral0 inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&lt;br /&gt;
note that in the FreeBSD handbook inet is placed incorrectly,pay also attention to the channel 4...i tried it without it and it didn't work&lt;br /&gt;
then try to associate with a client running an operating system such as *BSD or GNU/Linux and ping it:&lt;br /&gt;
if something goes wrong(ping doesn't work) simply type dmesg and look for message about your wifi card(such as associations messages)&lt;br /&gt;
under GNU/Linux type as root(remplacing wlan0 by your wifi card interface name):&lt;br /&gt;
 ifconfig wlan0 up&lt;br /&gt;
 iwlist wlan0 scan&lt;br /&gt;
 iwconfig wlan0 essid &amp;quot;freebsdap&amp;quot;&lt;br /&gt;
 ifconfig wlan0 192.168.1.100 netmask 255.255.255.0&lt;br /&gt;
 ping 192.168.1.1&lt;br /&gt;
under FreeBSD type as root(remplacing ral0 by your wifi card interface name):&lt;br /&gt;
 ifconfig ral0 up&lt;br /&gt;
 ifconfig ral0 list scan&lt;br /&gt;
 ifconfig ral0 inet 192.168.1.100 netmask 255.255.255.0 ssid freebsdap&lt;br /&gt;
 ping 192.168.1.1&lt;br /&gt;
then if you can see the wireless and can ping it simply add the following to /etc/rc.conf:&lt;br /&gt;
 ifconfig_ral0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&amp;quot;&lt;br /&gt;
===dns and dhcp===&lt;br /&gt;
your wireless is now working...so we can install a dns and dhcp server...&lt;br /&gt;
for simplicity we will use dnsmasq&lt;br /&gt;
type the following as root:&lt;br /&gt;
 cd /usr/ports/dns/dnsmasq&lt;br /&gt;
 make config&lt;br /&gt;
then unselect ipv6 unless you need it&lt;br /&gt;
and unselect dbus because we won't use it&lt;br /&gt;
then type the following as root:&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
then we will need to configure dnsmasq:&lt;br /&gt;
edit /usr/local/etc/dnsmasq.conf with your favorite editor and add the following:&lt;br /&gt;
 # filter what we send upstream&lt;br /&gt;
 domain-needed&lt;br /&gt;
 bogus-priv&lt;br /&gt;
 filterwin2k&lt;br /&gt;
 localise-queries&lt;br /&gt;
 &lt;br /&gt;
 # allow /etc/hosts and dhcp lookups via *.lan&lt;br /&gt;
 local=/lan/&lt;br /&gt;
 domain=workgroup&lt;br /&gt;
 expand-hosts&lt;br /&gt;
 #resolv-file=/tmp/resolv.conf.auto&lt;br /&gt;
 &lt;br /&gt;
 dhcp-authoritative&lt;br /&gt;
 #dhcp-leasefile=/tmp/dhcp.leases&lt;br /&gt;
 &lt;br /&gt;
 # use /etc/ethers for static hosts; same format as --dhcp-host&lt;br /&gt;
 # &amp;lt;hwaddr&amp;gt; &amp;lt;ipaddr&amp;gt;&lt;br /&gt;
 read-ethers&lt;br /&gt;
 &lt;br /&gt;
 # other useful options:&lt;br /&gt;
 # default route(s):&lt;br /&gt;
 dhcp-option=3,192.168.1.1&lt;br /&gt;
 #    dns server(s):&lt;br /&gt;
 dhcp-option=6,192.168.1.1&lt;br /&gt;
&lt;br /&gt;
 dhcp-range=192.168.1.100,192.168.1.255,255.255.255.0,12h&lt;br /&gt;
the file don't need to be explained but read-ethers...&lt;br /&gt;
read ethers permit you to assign static ip to certain mac address&lt;br /&gt;
so edit /etc/ethers with entries like this:&lt;br /&gt;
 00:14:85:11:EF:02 192.168.1.106&lt;br /&gt;
and in order to give a dns name to this entry edit /etc/hosts and add an entry like this:&lt;br /&gt;
 192.168.1.106 Ralink&lt;br /&gt;
&lt;br /&gt;
then in order to start your dnsmasq server at boot you need to add the following to /etc/rc.conf:&lt;br /&gt;
dnsmasq_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
you can now test the wifi connection with any graphical tool(like NetworkManager in GNU/linux or even test it with a windows computer)&lt;br /&gt;
you can even try to ping a website...but you will only get his ip and no response...that's because we didn't set up the NAT yet...&lt;br /&gt;
&lt;br /&gt;
==Nat and firewall==&lt;br /&gt;
in order to set the nat we will add this to /etc/rc.conf:(remplacing ral0 by your wired card(that is connected to the internet) interface name)::&lt;br /&gt;
 gateway_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_type=&amp;quot;OPEN&amp;quot;&lt;br /&gt;
 natd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 natd_interface=&amp;quot;rl0&amp;quot;&lt;br /&gt;
 natd_flags=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
now normally the access point should work...&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/AccessPoint</id>
		<title>AccessPoint</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/AccessPoint"/>
				<updated>2008-05-31T22:10:37Z</updated>
		
		<summary type="html">&lt;p&gt;GNUtoo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
FreeBSD is very well suited to be used as an access point,because it has out of the box support of the master mode for a variety of cards such as ralink,atheros cards.&lt;br /&gt;
Under GNU/Linux you have to:&lt;br /&gt;
*use a kernel that is not out yet(2.6.26-rc4)&lt;br /&gt;
*patch the kernel with the patch named allow-ap-vlan-modes.patch from http://johannes.sipsolutions.net/patches/kernel/all/LATEST/&lt;br /&gt;
*compile a recent libnl(i used libnl-1.1-r1 in gentoo) against the kernel&lt;br /&gt;
*in gentoo you need to copy nl80211.h from your kenrel directory to /usr/include/linux&lt;br /&gt;
*then finally you need to compile a git version of hostapd...&lt;br /&gt;
at the end i got a system that is working with broadcom not ralink ones(made my computer freeze)&lt;br /&gt;
&lt;br /&gt;
under FreeBSD it's a lot more easy&lt;br /&gt;
&lt;br /&gt;
==The hardware==&lt;br /&gt;
i used:&lt;br /&gt;
*2 realtech pci 10/100 cards,in FreeBSD they are recognized as rl0 and rl1(maybe there is the possibility to use interfaces aliasing but as i had 2 cards...)&lt;br /&gt;
*a ralink rt2500 pci card,in FreeBSD it's recognized as ral0&lt;br /&gt;
&lt;br /&gt;
==The installation and configuration==&lt;br /&gt;
*install FreeBSD as usual(i used FreeBSD 7.0)&lt;br /&gt;
*enable ssh logins during the installation or add this in your /etc/rc.conf:&lt;br /&gt;
 sshd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
*if you have got a dhcp modem you can use add the following in your /etc/rc.conf(remplacing ral0 by your wired card interface name)&lt;br /&gt;
 ifconfig_rl0=&amp;quot;DHCP&amp;quot;&lt;br /&gt;
otherwise we'll see pppoe later...&lt;br /&gt;
===Wireless===&lt;br /&gt;
*then type the following command as root(remplacing ral0 by your wifi card interface name):&lt;br /&gt;
 ifconfig ral0 inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&lt;br /&gt;
note that in the FreeBSD handbook inet is placed incorrectly,pay also attention to the channel 4...i tried it without it and it didn't work&lt;br /&gt;
then try to associate with a client running an operating system such as *BSD or GNU/Linux and ping it:&lt;br /&gt;
if something goes wrong(ping doesn't work) simply type dmesg and look for message about your wifi card(such as associations messages)&lt;br /&gt;
under GNU/Linux type as root(remplacing wlan0 by your wifi card interface name):&lt;br /&gt;
 ifconfig wlan0 up&lt;br /&gt;
 iwlist wlan0 scan&lt;br /&gt;
 iwconfig wlan0 essid &amp;quot;freebsdap&amp;quot;&lt;br /&gt;
 ifconfig wlan0 192.168.1.100 netmask 255.255.255.0&lt;br /&gt;
 ping 192.168.1.1&lt;br /&gt;
under FreeBSD type as root(remplacing ral0 by your wifi card interface name):&lt;br /&gt;
 ifconfig ral0 up&lt;br /&gt;
 ifconfig ral0 list scan&lt;br /&gt;
 ifconfig ral0 inet 192.168.1.100 netmask 255.255.255.0 ssid freebsdap&lt;br /&gt;
 ping 192.168.1.1&lt;br /&gt;
then if you can see the wireless and can ping it simply add the following to /etc/rc.conf:&lt;br /&gt;
 ifconfig_ral0=&amp;quot;inet 192.168.1.1 netmask 255.255.255.0 ssid freebsdap mediaopt hostap channel 4&amp;quot;&lt;br /&gt;
===dns and dhcp===&lt;br /&gt;
your wireless is now working...so we can install a dns and dhcp server...&lt;br /&gt;
for simplicity we will use dnsmasq&lt;br /&gt;
type the following as root:&lt;br /&gt;
 cd /usr/ports/dns/dnsmasq&lt;br /&gt;
 make config&lt;br /&gt;
then unselect ipv6 unless you need it&lt;br /&gt;
and unselect dbus because we won't use it&lt;br /&gt;
then type the following as root:&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
then we will need to configure dnsmasq:&lt;br /&gt;
edit /usr/local/etc/dnsmasq.conf with your favorite editor and add the following:&lt;br /&gt;
 # filter what we send upstream&lt;br /&gt;
 domain-needed&lt;br /&gt;
 bogus-priv&lt;br /&gt;
 filterwin2k&lt;br /&gt;
 localise-queries&lt;br /&gt;
 &lt;br /&gt;
 # allow /etc/hosts and dhcp lookups via *.lan&lt;br /&gt;
 local=/lan/&lt;br /&gt;
 domain=workgroup&lt;br /&gt;
 expand-hosts&lt;br /&gt;
 #resolv-file=/tmp/resolv.conf.auto&lt;br /&gt;
 &lt;br /&gt;
 dhcp-authoritative&lt;br /&gt;
 #dhcp-leasefile=/tmp/dhcp.leases&lt;br /&gt;
 &lt;br /&gt;
 # use /etc/ethers for static hosts; same format as --dhcp-host&lt;br /&gt;
 # &amp;lt;hwaddr&amp;gt; &amp;lt;ipaddr&amp;gt;&lt;br /&gt;
 read-ethers&lt;br /&gt;
 &lt;br /&gt;
 # other useful options:&lt;br /&gt;
 # default route(s):&lt;br /&gt;
 dhcp-option=3,192.168.1.1&lt;br /&gt;
 #    dns server(s):&lt;br /&gt;
 dhcp-option=6,192.168.1.1&lt;br /&gt;
&lt;br /&gt;
 dhcp-range=192.168.1.100,192.168.1.255,255.255.255.0,12h&lt;br /&gt;
the file don't need to be explained but read-ethers...&lt;br /&gt;
read ethers permit you to assign static ip to certain mac address&lt;br /&gt;
so edit /etc/ethers with entries like this:&lt;br /&gt;
 00:14:85:11:EF:02 192.168.1.106&lt;br /&gt;
and in order to give a dns name to this entry edit /etc/hosts and add an entry like this:&lt;br /&gt;
 192.168.1.106 Ralink&lt;br /&gt;
&lt;br /&gt;
then in order to start your dnsmasq server at boot you need to add the following to /etc/rc.conf:&lt;br /&gt;
dnsmasq_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
you can now test the wifi connection with any graphical tool(like NetworkManager in GNU/linux or even test it with a windows computer)&lt;br /&gt;
you can even try to ping a website...but you will only get his ip and no response...that's because we didn't set up the NAT yet...&lt;br /&gt;
&lt;br /&gt;
==Nat and firewall==&lt;br /&gt;
in order to set the nat we will add this to /etc/rc.conf:(remplacing ral0 by your wired card(that is connected to the internet) interface name)::&lt;br /&gt;
 gateway_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 firewall_type=&amp;quot;OPEN&amp;quot;&lt;br /&gt;
 natd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 natd_interface=&amp;quot;rl0&amp;quot;&lt;br /&gt;
 natd_flags=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
now normally the access point should work...&lt;/div&gt;</summary>
		<author><name>GNUtoo</name></author>	</entry>

	</feed>