Achtung! Die Howtos stammen aus der Zeit vor 2006 und sind nur noch aus historischen Gründen online!
options IPFIREWALL #firewall #options IPFIREWALL_VERBOSE #print information about # dropped packets options IPFIREWALL_FORWARD #enable transparent proxy support options IPFIREWALL_VERBOSE_LIMIT=100 #limit verbosity options IPFIREWALL_DEFAULT_TO_ACCEPT #allow everything by default options IPDIVERT #divert sockets
Gegebenenfalls beachten Sie auch gleich die Kernelkonfiguration des ADSL Zugang unter FreeBSD (mpd) How-To's.
Nach Änderung der Kernelconfig wie im FreeBSD Handbook beschrieben den Kernel neu compilieren und installieren:
config NAT cd ../../compile/NAT make depend make make install
Vorgangsweise wie im ADSL Zugang unter FreeBSD (mpd) How-To.
Im Abschnitt adsl der Konfigurationsdatei mpd.conf folgende Zeile ergänzen:
set iface up-script /usr/local/sbin/adslnatdBsp:
default: load adsl adsl: new -i ng0 adsl adsl set iface disable on-demand set iface addrs 192.168.1.1 192.168.2.2 set iface idle 0 set iface route default set iface up-script /usr/local/sbin/adslnatd set bundle disable multilink set bundle authname xyz@inode.at set bundle password abcdefg12 set link no acfcomp protocomp set link no pap set link disable chap set link accept chap set ipcp no vjcomp open
Mehr zum Thema mpd findet man hier.
#!/bin/sh if=$1 action=$2 LOG="/var/log/adslnatd.log" NATD="/sbin/natd__n_$if__dynamic__use_sockets/index.html" echo "$0 $* started" >$LOG if [ x$action = xstop ]; then echo "$0 stop" >>$LOG /sbin/ipfw delete 50 killall natd sleep 10 killall -9 natd >/dev/null 2>&1 exit fi ps -ax | grep -q "$NATD" >>$LOG if ! ps -ax | grep -q "$NATD"; then echo "$0 start" >>$LOG $NATD && \ /sbin/ipfw -q add 50 divert natd all from any to any via $if fi
und setzen Sie die Rechte zum Ausführen: chmod a+x adslnatd
Optional kann der NAT-Daemon natd mit Hilfe der Datei /etc/natd.conf konfiguriert werden.
#!/bin/sh case "$1" in start) /usr/local/sbin/mpd -s mpd -b adsl && echo -n " adsl" ;; stop) killall mpd && echo -n " adsl" ;; *) echo "" echo "Usage: `basename $0` { start | stop }" echo "" exit 64 ;; esac
und setzen Sie die Rechte zum Ausführen: chmod a+x adsl.sh
Copyright (C) 2001 Name mranner@bugat.at