FreeBSD + FreeRadius + MySQL
Neste artigo aprenderemos a criar um servidor PPPoE em FreeBSD com autenticação no FreeRadius consultando um banco de dados em MySQL. Será uma conexão com usuário e senha como a maioria dos provedores ADSL provêem, liberando um IP inválido para cada estação.
Compilando o Kernel
Depois de instalar o FreeBSD, compilar o kernel.
Via sysinstall:
# sysinstall
Configure
Distributions
[x] src
[x] sys
# cd /sys/i386/conf/
# cp GENERIC nome_da_maquina
# ee nome_da_maquina
Incluir no final do arquivo:
# config SEUKERNEL
# cd ../compile/SEUKERNEL
# make depend
# make
# make install
# reboot
Via sysinstall:
# sysinstall
Configure
Distributions
[x] src
[x] sys
# cd /sys/i386/conf/
# cp GENERIC nome_da_maquina
# ee nome_da_maquina
Incluir no final do arquivo:
options IPFIREWALL #firewall
options IPFIREWALL_VERBOSE #enable logging to syslogd(8)
options IPFIREWALL_VERBOSE_LIMIT=100 #limit verbosity
options IPFIREWALL_DEFAULT_TO_ACCEPT #allow everything by default
options IPFIREWALL_FORWARD #packet destination changes
options IPFILTER
options IPFILTER_LOG
options IPDIVERT #divert sockets
options IPSTEALTH #support for stealth forwarding
options DUMMYNET
options HZ=1000
options ALTQ
options ALTQ_CBQ # Class Bases Queueing
options ALTQ_RED # Random Early Drop
options ALTQ_RIO # RED In/Out
options ALTQ_HFSC # Hierarchical Packet Scheduler
options ALTQ_CDNR # Traffic conditioner
options ALTQ_PRIQ # Priority Queueing
options NETGRAPH
options NETGRAPH_PPPOE
options NETGRAPH_SOCKET
options NETGRAPH_IFACE
options BRIDGE
options IPFIREWALL_VERBOSE #enable logging to syslogd(8)
options IPFIREWALL_VERBOSE_LIMIT=100 #limit verbosity
options IPFIREWALL_DEFAULT_TO_ACCEPT #allow everything by default
options IPFIREWALL_FORWARD #packet destination changes
options IPFILTER
options IPFILTER_LOG
options IPDIVERT #divert sockets
options IPSTEALTH #support for stealth forwarding
options DUMMYNET
options HZ=1000
options ALTQ
options ALTQ_CBQ # Class Bases Queueing
options ALTQ_RED # Random Early Drop
options ALTQ_RIO # RED In/Out
options ALTQ_HFSC # Hierarchical Packet Scheduler
options ALTQ_CDNR # Traffic conditioner
options ALTQ_PRIQ # Priority Queueing
options NETGRAPH
options NETGRAPH_PPPOE
options NETGRAPH_SOCKET
options NETGRAPH_IFACE
options BRIDGE
# config SEUKERNEL
# cd ../compile/SEUKERNEL
# make depend
# make
# make install
# reboot