Gateway und restliche Netzwerkinfrastruktur
Diese Seite ist ist Teil der Technischen Dokumentation von Radio Helsinki. Alle weiteren Seiten der Dokumentation:
Gateway
Hardware/Betriebsystem
- Alix 2c2 mit 4Gb CF Karte
- Debian Lenny mit einigen Modifikation um auf einem Read-Only Rootfilesystem zu laufen.
je eines der 3 Ethernetinterfacese hängt in den VLANs lan, mur.at und 0xFF
Konfiguration
Firewall und NAT
Die Datei /etc/init.d/firewall beeinhalted die gesamte Firewall und NAT Konfiguration.
### BEGIN INIT INFO
# Provides: firewall
# Required-Start: networking
# Required-Stop: networking
# Default-Start:
# Default-Stop:
# Short-Description: configure firewall.
### END INIT INFO
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
[ -x /sbin/iptables ] || exit 0
EXT_IF=eth0
PUBLIC_IP=89.106.209.26
MODEMS_IP=172.16.19.36
MODEMS_NET=172.16.0.0/16
INT_IF=eth1
LOCAL_NET=192.168.1.0/24
FF_IF=eth2
BLOCKED_HOSTS=""
MURONLY_HOSTS="192.168.1.45"
MUR_NET="89.106.208.0/21"
PORTFW="tcp,22,192.168.1.32"
PORTFW=$PORTFW" tcp,80,192.168.1.8"
PORTFW=$PORTFW" tcp,443,192.168.1.8"
PORTFW=$PORTFW" udp,2020,192.168.1.21"
PORTFW=$PORTFW" tcp,22001,192.168.1.16"
PORTFW=$PORTFW" tcp,22002,192.168.1.51:22"
PORTFW=$PORTFW" tcp,8081,192.168.1.16:80"
start_firewall() {
echo -n "Starting Firewall "
# main NAT
/sbin/iptables -t nat -A POSTROUTING -s $LOCAL_NET -d $MODEMS_NET -o $EXT_IF -j SNAT --to $MODEMS_IP
/sbin/iptables -t nat -A POSTROUTING -s $LOCAL_NET -o $EXT_IF -j SNAT --to $PUBLIC_IP
# block all traffic from these hosts
for host in $BLOCKED_HOSTS; do
/sbin/iptables -t filter -A FORWARD -s $host -j DROP
done
# allow traffic to mur.at only
for host in $MURONLY_HOSTS; do
/sbin/iptables -t filter -A FORWARD -s $host ! -d $MUR_NET -j DROP
done
# install port forwardings
for fw in $PORTFW; do
proto=${fw%%,*}
port=${fw#*,}
port=${port%%,*}
to=${fw##*,}
/sbin/iptables -t nat -A PREROUTING -d $PUBLIC_IP -p $proto --dport $port -j DNAT --to $to
done
echo "."
}
stop_firewall() {
echo -n "Stoping Firewall "
/sbin/iptables -t mangle -F
/sbin/iptables -t nat -F
/sbin/iptables -t filter -F
echo "."
}
case "$1" in
start)
start_firewall
;;
stop)
stop_firewall
;;
restart)
stop_firewall
sleep 1
start_firewall
;;
*)
echo "Usage: /etc/init.d/firewall {start|stop|restart}"
exit 1
;;
esac
exit 0
DHCP-Server
tba..
NTP-Server
tba..
Boot Server (TFTP)
tba..
Modem
tba..
Switches
Im Radio sind derzeit 4 managebare Switches im Einsatz. Diese werden wie in Netzwerkplan gezeigt verwendet.
SW0
Ein Cisco SRW2024 Switch der im Infrastruktur Rack untergebracht ist. Es handelt sich dabei um eine managebaren 24 Port GBit Switch.
Portbelegung
tba..
SW1
Ein Cisco SRW2024 Switch der im Server Rack untergebracht ist. Es handelt sich dabei um einen managebaren 24 Port GBit Switch.
Portbelegung
tba..
SW2
Ein Cisco SRW2008 Switch der im Technikraum untergebracht ist. Es handelt sich dabei um einen managebaren 8 Port GBit Switch.
Portbelegung
tba..
SW3
Ein Cisco SRW2008 Switch der im Technikraum untergebracht ist. Es handelt sich dabei um einen managebaren 8 Port GBit Switch.
Portbelegung
tba..
Radio Helsinki Technik Wiki