PPPOE, access point
Contents |
Introduction
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:
- ssh
- web server
- port redirection for various applications such as games server(such as wormux that needs an open port in order to serve),or p2p
Fortunately the alice gate let us connect directly to the internet: see here for how to deactivate the router functions and so be connected directly to the internet...
The hardware
For my setup, and the instructions included here, I used the same hardware as in AccessPoint that is to say:
- 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...)
- 1 Ralink rt2500 PCI card, on FreeBSD. This card is recognized as ral0.
Installation and Configuration
- Install FreeBSD as usual. This example uses FreeBSD 7.0.
- Enable ssh logins during the installation, or add the following line to your /etc/rc.conf:
sshd_enable="YES"
PPPOE
This part can be difficult but we need internet working before following the installation
here's my configuration file:
default:
set log Phase Chat LCP IPCP CCP tun command
ident user-ppp VERSION (built COMPILATIONDATE)
# Ensure that "device" references the correct serial port
# for your modem. (cuaa0 = COM1, cuaa1 = COM2)
#
set device /dev/cuaa1
set speed 115200
set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
\"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
set timeout 180 # 3 minute idle timer (the default)
enable dns # request DNS info (for resolv.conf)
alice:
disable ipv6cp
add default HISADDR
set device PPPoE:rl1
set log Phase tun command
set ifaddr 10.0.0.1/0 10.0.0.2/0
set MRU 1490
set MTU 1490
# set log Phase tun command
set authname username@alice.it
set authkey password
set dial
set login
set cd 5
set redial 0 0
set lqrperiod 5
enable dns
enable tcpmssfixup
enable lqr
#nat enable yes
#nat use_sockets yes
#nat unregistered_only yes
note the space at the beginning of the lines,
here you must change the interface that is rl1 in this line:
set device PPPoE:rl1
i disabled ipv6 because it is not needed and messages error were comming in my logs about it,here's the line:
disable ipv6cp
that is realy the lines that are in my configuration: that's because of my provider(alice from italy)...
set authname username@alice.it set authkey password
you can also optionally change the name alice in this line:
alice:
if you do not have it add theses 2 line in /etc/syslog.conf:
!ppp *.* /var/log/ppp.log
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)