Basiskonfiguration von openwrt/kamikaze auf Linksys WRT54GL

Zunächst ist das System mittels dieser Firmware zu flashen. Nach dem üblichen ersten Login via telnet ist der SSH Zugriff zu konfigurieren.

Siehe auch Konfiguration im WIKI.

SSH/dropbear

  • PublicKey Authentisierung ermöglichen durch Hinterlegen in /etc/dropbear/authorized_keys.
  • Ausschalten der Passwort Authentisierung nach Kontrolle der Rechte (0600 bzw. 0700 fürs Verzeichnis)

/etc/config/dropbear

config dropbear                                                                                                                                    
   option PasswordAuth 'off'
   option Port         '22'

Netzwerk

  • vi /etc/config/network
  • IP-Alias Patch nicht vergessen!

NTP

  • ipkg install ntpclient
  • /etc/init.d/custom-user-startup mit Inhalt anlegen

custom-user-startup

#!/bin/sh
# kill any existing ntpclient processes
# (they can get stuck if no route to target host)
/usr/bin/killall ntpclient

# do time sync
/usr/sbin/ntpclient -c 1 -s -h de.pool.ntp.org &
  • Verlinken als Startup Skript
    • cd /etc/rc.d && ln -s /etc/init.d/custom-user-startup S94custom-user-startup
  • Zeitzone auf Europa/Berlin einstellen.
    • echo ‘CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00’ > /etc/TZ
    • NOTE: This sets the time zone for CET/CEST (Central European Time UTC+1 / Central European Summer Time UTC+2) and the starting (5th week of March at 02:00) and endtime (5th week of October at 03:00) of DST (Daylight Saving Time).

DSL/drop und reconnect

  • crontab -e

crontab

55 03 * * * /sbin/ifup wan
0 * * * * /usr/sbin/ntpclient -c 1 -s -h de.pool.ntp.org

ipkg.conf

  • ipkg update
  • ipkg list

/etc/ipkg.conf

src release http://downloads.openwrt.org/kamikaze/7.07/brcm47xx-2.6/packages
src packages http://downloads.openwrt.org/kamikaze/packages/mipsel
dest root /
dest ram /tmp

syslog

Firewall/Shorewall

Alternative: SimpleFirewall

  • ipkg install shorewall
  • ipkg install ip iptables-utils iptables-mod-extra iptables-mod-conntrack
  • ipkg install iptables-mod-ulog iptables-mod-nat iptables-mod-filter iptables-mod-ipopt
  • ipkg install iptables-mod-filter iptables-mod-ipset

shorewall check /etc/shorewall auf openwrt meldet /sbin/shorewall hostname - command not found. Das ist korrekt, unter OpenWRT ist der Hostname mittels config_get bzw. cat /proc/sys/kernel/hostname auszulesen.

:!: Workaround: > /bin/hostname && chmod 755 /bin/hostname.

/bin/hostname

#!/bin/sh
cat /proc/sys/kernel/hostname

/etc/shorewall/rules

#ACTION SOURCE          DEST            PROTO   DEST    SOURCE          ORIGINAL        RATE            USER/
#                                               PORT    PORT(S)         DEST            LIMIT           GROUP
#SECTION ESTABLISHED
#SECTION RELATED
SECTION NEW
ACCEPT  net             fw                      icmp
ACCEPT  net             fw                      tcp     22
ACCEPT  fw              net                     udp     53
ACCEPT  fw              net                     tcp     53
ACCEPT  fw              net                     tcp     23
ACCEPT  fw              net                     tcp     123
ACCEPT  fw              net                     udp     123
ACCEPT  fw              net                     tcp     443
ACCEPT  fw              net                     tcp     80
ACCEPT  fw              net                     tcp     22
ACCEPT  fw              dmz                     tcp     22
ACCEPT  fw              net                     tcp     21
ACCEPT  fw              net                     icmp
ACCEPT  fw              dmz                     icmp
ACCEPT  fw              dmz                     tcp     80
DNAT    net             dmz:192.168.1.17        tcp     22      -       212.60.135.97
DNAT    net             dmz:192.168.1.17        tcp     80      -       212.60.135.97
ACCEPT  dmz             net                     icmp
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
 
wissen/openwrt/kamikaze-auf-cisco-linksys-router-wrt54gl-de-basiskonfiguration.txt · Zuletzt geändert: 05.09.2010 20:31
 
Recent changes RSS feed Donate Valid XHTML 1.0 Valid CSS Recent cached RSS feed cacert-signed web site: inhalt.serviert.de