Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
|
fortgeschrittene_11._-_13._juli_2011 [2011/07/17 19:20] admin [Datensicherung] |
fortgeschrittene_11._-_13._juli_2011 [2011/07/17 20:35] (aktuell) admin [Anbindung von Windows-Clients am server4education] |
||
|---|---|---|---|
| Zeile 63: | Zeile 63: | ||
| ===== Anbindung von Windows-Clients am server4education ===== | ===== Anbindung von Windows-Clients am server4education ===== | ||
| + | *Ab 2011: winxp_s4e2011.exe win7_s4e2011.exe | ||
| + | * bis jetzt am s4e unter /opt/s4e/server-daten/domainenanbindung oder http://d4e.at/d4e2011 | ||
| + | * Nur 1x ausführen! Danach immer über Arbeitsplatz, Computername ändern, ... | ||
| ===== Drucken mit CUPS ===== | ===== Drucken mit CUPS ===== | ||
| + | *Ordentliche Drucker verwenden! Gibt es keine Druckertreiben für Linux => Neuen Drucker kaufen! | ||
| + | *Netzwerkdrucker: | ||
| + | * statische IP Adresse vergeben (Bedienfeld am Drucker, Webinterface, ... Anleitung beachten) | ||
| + | * Druck-Protokoll aktivieren: LPD, IPP, Socket/DirectJet | ||
| + | * CUPS am Server: | ||
| + | * http://localhost:631 (Passwort = root Passwort) | ||
| + | * Verwaltung: | ||
| + | * Zeige freigegebene Drucker von anderen Systemen | ||
| + | * Freigeben von Druckern welche mit diesem System verbunden sind | ||
| + | * Erlaube Drucken vom Internet aus | ||
| + | * Erlaube entfernte Verwaltung | ||
| + | * Drucker hinzufügen: | ||
| + | * socket://192.168.100.9:9100 | ||
| + | * http://192.168.100.9:631/printers/druckername | ||
| + | * lpd://192.168.100.9/druckername | ||
| + | * smb:username:passwort@/192.168.100.9/freigabename | ||
| + | * Treiber: | ||
| + | * Herstellerseiten: Support | ||
| + | * http://www.openprinting.org/printers/ | ||
| + | * Drucker - Standardeinstellungen festlegen: | ||
| + | * A4 !!! Falls es nicht geht, in /etc/sysconfig/suseconfig : GROFF_PAGESIZE="a4", danach SuSEconfig ausführen | ||
| + | * Richtlinien: Fehlerbehandlung: Abort job | ||
| + | * Druckerquota: | ||
| + | * Pykota (nicht mehr ganz aktuelle Anleitung: http://geo.uni-bonn.de/de/software/pykota.html | ||
| + | * Pakete im OBS: http://software.opensuse.org/search?q=pykota&baseproject=openSUSE%3A11.4&lang=de&exclude_debug=true | ||
| + | * Auswertung: z.B. Intranetlösung (auf Anfrage bei uns!) | ||
| ===== Benutzerprofil ändern ===== | ===== Benutzerprofil ändern ===== | ||
| + | *Ab 2011: Pro Benutzergruppe / Benutzer profil_<gruppenname> | ||
| + | * profil_wartung | ||
| + | * profil_schueler | ||
| + | * profil_lehrer | ||
| + | * profil_sonstige | ||
| + | * profil_absolventen | ||
| + | *Windows (XP / 7): | ||
| + | * Anmelden als profil_<gruppenname> | ||
| + | * Änderungen durchführen | ||
| + | * Abmelden | ||
| + | *Linux: | ||
| + | * Pro Client, für alle Benutzer bis jetzt (soll sich aber bald ändern, dass es so bequem wie unter Windows wird) | ||
| ===== Deployment/Klonen ===== | ===== Deployment/Klonen ===== | ||
| - | \\ | ||
| - | ** [[http://d4e.at/index.php?option=com_content&view=article&id=115:klonen&catid=57:klonen&Itemid=70|Klonen]]**\\ | ||
| * Windows | * Windows | ||
| * [[http://bgweiz.at/dw/doku.php?id=sysprep|Sysprep]] | * [[http://bgweiz.at/dw/doku.php?id=sysprep|Sysprep]] | ||
| - | * [[http://d4e.at/d4e2010/anleitungen/vorbereiten-zum-klonen/|Linux]] | + | * [[http://d4e.at/support/version-2010/klonen/windows-xp-fuer-das-klonen-vorbereiten-mit-sysprep/]] |
| - | * MAC-Adresse entfernen | + | * [[http://www.microsoft.com/downloads/de-de/details.aspx?familyid=7d2f6ad7-656b-4313-a005-4e344e43997d&displaylang=de|Remoteserver-Verwaltungstools für Windows 7 mit Service Pack 1 (SP1) ]] |
| + | * Udpcast | ||
| + | * http://d4e.at/support/version-2010/klonen/klonen-mit-udpcast/ | ||
| + | * Linux | ||
| + | * http://d4e.at/support/version-2010/klonen/vorbereitungen-zum-klonen-von-desktop4education-2010/ | ||
| + | * /etc/udev/rules.d/70-persistent-net.rules | ||
| + | * /etc/fstab | ||
| + | * /boot/grub/menu.lst | ||
| + | * /boot/grub/devices.map | ||
| + | * /etc/sysconfig/bootloader | ||
| + | * >> am d4e2011 alles schon konfiguriert: Keine Vorbereitungen mehr notwendig!!! | ||
| * [[http://www.feyrer.de/g4u/|g4u]] | * [[http://www.feyrer.de/g4u/|g4u]] | ||
| * [[http://udpcast.linux.lu/20080914/udpcd.iso|Download udp-cast CD-Image]] | * [[http://udpcast.linux.lu/20080914/udpcd.iso|Download udp-cast CD-Image]] | ||
| - | * [[http://bgweiz.at/dw/doku.php?id=multicast&s=udpcast|multicasting mit udp-cast]] | + | * [[http://peer.st/dw/doku.php?id=multicast&s=udpcast|multicasting mit udp-cast]] |
| - | \\ | + | |
| - | *Vorführung: FOG (Free Open Ghost) | + | *Vorführung: FOG (Free Open Ghost) [[http://www.fogproject.org/]] |
| ===== Datensicherung ===== | ===== Datensicherung ===== | ||
| Zeile 120: | Zeile 168: | ||
| Backupskripte am besten in einen extra Ordner anlegen: /backup \\ | Backupskripte am besten in einen extra Ordner anlegen: /backup \\ | ||
| Hauptsicherung: Konfigurationsdaten, Backupskripte selbst, Cronjob selbst \\ | Hauptsicherung: Konfigurationsdaten, Backupskripte selbst, Cronjob selbst \\ | ||
| - | Login ohne Passwort einrichten für ssh: [[ssh_schluessel_-_anmeldung_ohne_passwort|SSH-Schlüssel - Anmeldung ohne Passwort]] | + | Login ohne Passwort einrichten für ssh: [[ssh_schluessel_-_anmeldung_ohne_passwort|SSH-Schlüssel - Anmeldung ohne Passwort]] \\ |
| Cronjob anlegen: | Cronjob anlegen: | ||
| Zeile 211: | Zeile 259: | ||
| sync | sync | ||
| </code> | </code> | ||
| + | |||
| + | ===== PXE - Netzwerkstart ===== | ||
| + | |||
| + | =ist ein Verfahren, um Computern einen netzwerkbasierten Bootvorgang zu ermöglichen. Der Computer ist dadurch von Massenspeicher und darauf installiertem Betriebssystem unabhängig.\\ | ||
| + | Muss im BIOS aktiviert sein, sollte aber jeder PC seit dem Jahr 1998(?) können. Oft sehr kreative Namensgebung der Hersteller.\\ | ||
| + | Für den Betrieb sind grundsätzlich 3 Komponenten notwendig: | ||
| + | *DHCP-Server: Damit Client seine Netzwerkeinstellungen und den für ihn vorgesehenen PXE-Server zugeteilt bekommt: | ||
| + | |||
| + | <code bash /etc/dhcpd.conf> | ||
| + | authoritative; | ||
| + | ddns-update-style none; | ||
| + | |||
| + | #eth2 unterrichtsnetz | ||
| + | |||
| + | subnet 192.168.100.0 netmask 255.255.255.0 { | ||
| + | range 192.168.100.60 192.168.100.200; | ||
| + | default-lease-time 3600; | ||
| + | max-lease-time 172800; | ||
| + | option broadcast-address 192.168.100.255; | ||
| + | option routers 192.168.100.254; | ||
| + | option subnet-mask 255.255.255.0; | ||
| + | option netbios-name-servers 193.170.221.1; | ||
| + | option domain-name-servers 8.8.8.8, 193.170.221.1; | ||
| + | option ntp-servers 193.170.221.1; | ||
| + | # pxe | ||
| + | filename "pxelinux.0"; | ||
| + | next-server 192.168.100.4; | ||
| + | } | ||
| + | </code> | ||
| + | |||
| + | *PXE-Server: Von ihm bekommt der Client das Betriebssystem | ||
| + | * Meist Trivial File Transfer Protocol (TFTP) oder besser Advanced TFTP server atftpd | ||
| + | * Ordner /tftpboot beinhaltet alle Dateien zum Starten | ||
| + | <code ini /etc/sysconfig/atftpd> | ||
| + | ATFTPD_OPTIONS="--daemon " | ||
| + | ATFTPD_USE_INETD="no" | ||
| + | ATFTPD_DIRECTORY="/tftpboot" | ||
| + | ATFTPD_BIND_ADDRESSES="" | ||
| + | </code> | ||
| + | * Bootloader: PXELINUX (aus dem Projekt SYSLINUX) in /usr/share/syslinux/ | ||
| + | <file> | ||
| + | SYSLINUX | ||
| + | dient dem Starten von FAT-Dateisystemen (wie Disketten und USB-Speichergeräten). | ||
| + | ISOLINUX | ||
| + | dient dem Starten von ISO 9660-Dateisystemen von CD-ROMs. | ||
| + | PXELINUX | ||
| + | dient dem Starten von einem Netzwerk-Server mittels der Preboot Execution Environment (PXE). | ||
| + | EXTLINUX | ||
| + | dient dem Starten von Linux' ext2-/ext3-Dateisystemen. | ||
| + | MEMDISK | ||
| + | dient dem Starten älterer Betriebssysteme wie MS-DOS von diesen Medien. | ||
| + | </file> | ||
| + | */tftpboot/memdisk | ||
| + | */tftpboot/memtest | ||
| + | */tftpboot/menu.c32 | ||
| + | */tftpboot/pxelinux.0 | ||
| + | */tftpboot/pxelinux.cfg/default | ||
| + | <code bash /tftpboot/pxelinux.cfg/default> | ||
| + | DEFAULT menu.c32 | ||
| + | PROMPT 0 | ||
| + | |||
| + | MENU TITLE Willkommen! | ||
| + | |||
| + | LABEL harddisk | ||
| + | MENU LABEL Von Festplatte booten | ||
| + | localboot 0x80 | ||
| + | |||
| + | LABEL openSUSE 11.3 32-bit | ||
| + | MENU LABEL openSUSE 11.3 32-bit | ||
| + | KERNEL /suse113/i586/boot/i386/loader/linux ramdisk_size=65536 | ||
| + | APPEND initrd=/suse113/i586/boot/i386/loader/initrd UseDHCP=1 InstMode=nfs Install=nfs://192.168.100.4/daten/pxe/suse113/i586 vga=0x317 splash=silent insecure=1 Language=de_DE showopts | ||
| + | |||
| + | LABEL openSUSE 11.3 64-bit | ||
| + | MENU LABEL openSUSE 11.3 64-bit | ||
| + | KERNEL /suse113/x86_64/boot/x86_64/loader/linux ramdisk_size=65536 | ||
| + | APPEND initrd=/suse113/x86_64/boot/x86_64/loader/initrd UseDHCP=1 InstMode=nfs Install=nfs://192.168.100.4/daten/pxe/suse113/x86_64 vga=0x317 splash=silent insecure=1 Language=de_DE showopts | ||
| + | |||
| + | LABEL openSUSE 11.4 32-bit | ||
| + | MENU LABEL openSUSE 11.4 32-bit | ||
| + | KERNEL /suse114/i586/boot/i386/loader/linux ramdisk_size=65536 | ||
| + | APPEND initrd=/suse114/i586/boot/i386/loader/initrd UseDHCP=1 InstMode=nfs Install=nfs://192.168.100.4/daten/pxe/suse114/i586 vga=0x317 splash=silent insecure=1 Language=de_DE showopts | ||
| + | |||
| + | LABEL openSUSE 11.4 64-bit | ||
| + | MENU LABEL openSUSE 11.4 64-bit | ||
| + | KERNEL /suse114/x86_64/boot/x86_64/loader/linux ramdisk_size=65536 | ||
| + | APPEND initrd=/suse114/x86_64/boot/x86_64/loader/initrd UseDHCP=1 InstMode=nfs Install=nfs://192.168.100.4/daten/pxe/suse114/x86_64 vga=0x317 splash=silent insecure=1 Language=de_DE showopts | ||
| + | |||
| + | LABEL s4e 32-bit | ||
| + | MENU LABEL server4education 32-bit installieren | ||
| + | KERNEL /d4e2011/iso/i586/boot/i386/loader/linux ramdisk_size=65536 | ||
| + | APPEND initrd=/d4e2011/iso/i586/boot/i386/loader/initrd AutoYaST=nfs://192.168.100.4/daten/d4e2011/pxe/i586/s4e.xml UseDHCP=1 InstMode=nfs Install=nfs://192.168.100.4/daten/d4e2011/iso/i586 vga=0x317 splash=silent insecure=1 Language=de_DE showopts | ||
| + | |||
| + | LABEL d4e 32-bit | ||
| + | MENU LABEL desktop4education 32-bit installieren | ||
| + | KERNEL /d4e2011/iso/i586/boot/i386/loader/linux ramdisk_size=65536 | ||
| + | APPEND initrd=/d4e2011/iso/i586/boot/i386/loader/initrd AutoYaST=nfs://192.168.100.4/daten/d4e2011/pxe/i586/d4e.xml UseDHCP=1 InstMode=nfs Install=nfs://192.168.100.4/daten/d4e2011/iso/i586 vga=0x317 splash=silent insecure=1 Language=de_DE showopts | ||
| + | |||
| + | LABEL s4e 64-bit | ||
| + | MENU LABEL server4education 64-bit installieren | ||
| + | KERNEL /d4e2011/iso/x86_64/boot/x86_64/loader/linux ramdisk_size=65536 | ||
| + | APPEND initrd=/d4e2011/iso/x86_64/boot/x86_64/loader/initrd AutoYaST=nfs://192.168.100.4/daten/d4e2011/pxe/x86_64/s4e.xml UseDHCP=1 InstMode=nfs Install=nfs://192.168.100.4/daten/d4e2011/iso/x86_64 vga=0x317 splash=silent insecure=1 Language=de_DE showopts | ||
| + | |||
| + | LABEL d4e 64-bit | ||
| + | MENU LABEL desktop4education 64-bit installieren | ||
| + | KERNEL /d4e2011/iso/x86_64/boot/x86_64/loader/linux ramdisk_size=65536 | ||
| + | APPEND initrd=/d4e2011/iso/x86_64/boot/x86_64/loader/initrd AutoYaST=nfs://192.168.100.4/daten/d4e2011/pxe/x86_64/d4e.xml UseDHCP=1 InstMode=nfs Install=nfs://192.168.100.4/daten/d4e2011/iso/x86_64 vga=0x317 splash=silent insecure=1 Language=de_DE showopts | ||
| + | |||
| + | LABEL g4l | ||
| + | MENU LABEL ghost4linux | ||
| + | KERNEL /klonen/g4l/bz37 ramdisk_size=65536 root=/dev/ram0 | ||
| + | APPEND initrd=/klonen/g4l/ramdisk.lzma | ||
| + | |||
| + | LABEL g4u | ||
| + | MENU LABEL ghost4unix | ||
| + | kernel memdisk | ||
| + | Append iso initrd=/klonen/g4u/g4u.iso raw | ||
| + | |||
| + | LABEL rescuecd_std | ||
| + | MENU LABEL SystemRescueCd | ||
| + | LINUX /sysrescd/isolinux/rescuecd | ||
| + | INITRD /sysrescd/isolinux/initram.igz setkmap=de nfsboot=192.168.100.4:/daten/pxe/sysrescd | ||
| + | APPEND scandelay=1 | ||
| + | |||
| + | LABEL udpcast | ||
| + | MENU LABEL Udpcast | ||
| + | KERNEL /klonen/udpcast/LINUX ramdisk_size=65536 auto=yes lang=DE kbmap=DE dhcp=yes enableDiskmodule=yes netmodule=tg3 netmodparm= port=9000 diskmodule=ata_piix diskmodparm= udpcparam= disk=/dev/sda umode=rcv compr=none | ||
| + | APPEND initrd=/klonen/udpcast/INITRD | ||
| + | |||
| + | LABEL GParted Live | ||
| + | MENU LABEL GParted Live | ||
| + | KERNEL /gparted/live/vmlinuz1 | ||
| + | APPEND initrd=/gparted/live/initrd1.img boot=live noswap noprompt config union=aufs nosplash vga=788 netboot=nfs nfsroot=192.168.100.4:/daten/pxe/gparted -- | ||
| + | |||
| + | LABEL memtest | ||
| + | MENU LABEL MEMTEST | ||
| + | KERNEL /memtest | ||
| + | </code> | ||
| + | |||
| + | *z.b.: | ||
| + | <file> | ||
| + | schroedinger:/tftpboot # la | ||
| + | insgesamt 309 | ||
| + | drwxr-xr-x 5 root root 384 10. Jul 16:32 . | ||
| + | drwxr-xr-x 26 root root 632 10. Jul 16:19 .. | ||
| + | lrwxrwxrwx 1 root root 14 29. Apr 18:52 d4e2011 -> /daten/d4e2011 | ||
| + | lrwxrwxrwx 1 root root 18 29. Apr 18:52 gparted -> /daten/pxe/gparted | ||
| + | drwxr-xr-x 5 root root 120 3. Mär 09:52 klonen | ||
| + | drwxr-xr-x 2 root root 48 3. Mär 09:52 knoppix | ||
| + | -rw-r--r-- 1 root root 25084 5. Jul 2010 memdisk | ||
| + | -r--r--r-- 1 root root 165080 23. Feb 00:00 memtest | ||
| + | -rw-r--r-- 1 root root 52148 1. Okt 2010 menu.c32 | ||
| + | -r--r--r-- 1 root root 41212 7. Nov 2010 pxeboot_ia32.bin | ||
| + | -rw-r--r-- 1 root root 16838 1. Okt 2010 pxelinux.0 | ||
| + | drwxr-xr-x 2 root root 72 17. Jul 19:36 pxelinux.cfg | ||
| + | lrwxrwxrwx 1 root root 18 29. Apr 18:52 suse113 -> /daten/pxe/suse113 | ||
| + | lrwxrwxrwx 1 root root 18 29. Apr 18:52 suse114 -> /daten/pxe/suse114 | ||
| + | lrwxrwxrwx 1 root root 19 29. Apr 18:52 sysrescd -> /daten/pxe/sysrescd | ||
| + | schroedinger:/tftpboot # | ||
| + | </file> | ||
| + | |||
| + | *Systeme: | ||
| + | * suse113/i586: openSUSE 11.3 DVD 32 Bit entpackt | ||
| + | * suse113/x86_64: openSUSE 11.3 DVD 64 Bit entpackt | ||
| + | * suse114/i586: openSUSE 11.4 DVD 32 Bit entpackt | ||
| + | * suse114/x86_64: openSUSE 11.4 DVD 64 Bit entpackt | ||
| + | * d4e2011/iso/i586: desktop4edcation 32 Bit entpackt | ||
| + | * d4e2011/iso/x86_64: desktop4edcation 64 Bit entpackt | ||
| + | * klonen/g4u ghost4unix http://www.feyrer.de/g4u/#reqs | ||
| + | * klonen/g4l ghost4linux http://sourceforge.net/projects/g4l/ | ||
| + | * klonen/udpcast Udpcast http://udpcast.linux.lu/bootmedia.html | ||
| + | * Skripten: KERNEL /klonen/udpcast/LINUX ramdisk_size=65536 auto=yes lang=DE kbmap=DE dhcp=yes enableDiskmodule=yes netmodule=tg3 netmodparm= port=9000 diskmodule=ata_piix diskmodparm= udpcparam= disk=/dev/sda umode=rcv compr=none | ||
| + | * sysrescd SystemRescueCd http://www.sysresccd.org/Download | ||
| + | * gparted GParted Partitionierung http://gparted.sourceforge.net/livecd.php (in SystemRescueCd enthalten) | ||
| + | * memtest Arbeitsspeichertest | ||
| + | |||
| + | *NFS-Server: Stellt die ausgepackten DVD Daten wirklich für den laufenden Betrieb zur Verfügung | ||
| + | <code ini /etc/exports> | ||
| + | /daten/d4e2011 192.168.100.*(crossmnt,async,ro,root_squash,no_subtree_check) | ||
| + | /daten/pxe 192.168.100.*(crossmnt,async,ro,no_root_squash,no_subtree_check) | ||
| + | </code> | ||
| + | |||
| ===== Softwareupdate am server4education und desktop4education ===== | ===== Softwareupdate am server4education und desktop4education ===== | ||
| Zeile 216: | Zeile 445: | ||
| *Never change a running System! | *Never change a running System! | ||
| *zypper | *zypper | ||
| - | *OpenBuildService von openSUSE | + | *OBS openSUSE Build Service |
| + | * http://build.opensuse.org | ||
| + | * http://software.opensuse.org | ||
| + | * d4e2011 Standardrepos (Stand: 11. Juli 2011) | ||
| + | <file> | ||
| + | #!/bin/bash | ||
| + | zypper ar -f -C http://ftp.halifax.rwth-aachen.de/opensuse/repositories/openSUSE:/11.4:/Contrib/standard/ contrib | ||
| + | zypper ar -f -C http://ftp5.gwdg.de/pub/opensuse/repositories/Education/openSUSE_11.4/ edu | ||
| + | zypper ar -f -C http://ftp5.gwdg.de/pub/opensuse/repositories/KDE:/Extra/openSUSE_11.4/ extra | ||
| + | zypper ar -f -C http://ftp5.gwdg.de/pub/opensuse/repositories/KDE:/Release:/46/openSUSE_11.4/ kde | ||
| + | zypper ar -f -C http://ftp5.gwdg.de/pub/opensuse/repositories/network:/ldap/openSUSE_11.4/ ldap | ||
| + | zypper ar -f -C http://ftp5.gwdg.de/pub/opensuse/repositories/X11:/lxde/openSUSE_11.4/ lxde | ||
| + | zypper ar -f -C http://ftp5.gwdg.de/pub/opensuse/repositories/mozilla/openSUSE_11.4/ mozilla | ||
| + | zypper ar -f -C http://ftp5.gwdg.de/pub/opensuse/distribution/11.4/repo/non-oss/ non-oss | ||
| + | zypper ar -f -C http://ftp5.gwdg.de/pub/opensuse/distribution/11.4/repo/oss/ oss | ||
| + | zypper ar -f -C http://packman.inode.at/suse/11.4 packman | ||
| + | zypper ar -f -C http://ftp.halifax.rwth-aachen.de/opensuse/repositories/devel:/languages:/perl/openSUSE_11.4/ perl | ||
| + | zypper ar -f -C http://ftp5.gwdg.de/pub/opensuse/repositories/server:/php:/applications/openSUSE_11.4/ php | ||
| + | zypper ar -f -C http://ftp5.gwdg.de/pub/opensuse/repositories/Printing/openSUSE_11.4/ pykota | ||
| + | zypper ar -f -C http://ftp5.gwdg.de/pub/opensuse/repositories/network:/samba:/STABLE/openSUSE_11.4/ samba | ||
| + | zypper ar -f -C http://ftp5.gwdg.de/pub/opensuse/repositories/science/openSUSE_11.4/ science | ||
| + | zypper ar -f -C http://ftp.halifax.rwth-aachen.de/opensuse/repositories/openSUSE:/Tumbleweed/standard/ tumbleweed | ||
| + | zypper ar -f -C http://ftp5.gwdg.de/pub/opensuse/update/11.4/ update | ||
| + | zypper ar -f -C http://ftp5.gwdg.de/pub/opensuse/repositories/home:/openLHAG:/branches:/Virtualization/openSUSE_Tumbleweed/ virt_tumbleweed | ||
| + | zypper ar -f -C http://download.videolan.org/pub/videolan/vlc/SuSE/11.4 vlc | ||
| + | zypper ar -f -C http://ftp5.gwdg.de/pub/opensuse/repositories/X11:/XOrg/openSUSE_11.4/ x11 | ||
| + | </file> | ||
| + | |||
| + | ===== NAT/Bridge ===== | ||
| + | |||
| + | == NAT == | ||
| + | |||
| + | Clientrechner hinter einem Router/Proxy \\ | ||
| + | Von außen nur durch Router/Proxy aus sichtbar: Verbindungen von Clients erscheinen außerhalb alle als 1 Verbindung des Routers \\ | ||
| + | Um Zugriff von außen auf einen Client intern zu erhalten: Port Weiterleitung: | ||
| + | |||
| + | <code bash /etc/init.d/bridge> | ||
| + | #!/bin/sh | ||
| + | ### BEGIN INIT INFO | ||
| + | # Provides: bridge | ||
| + | # Required-Start: network | ||
| + | # Should-Start: | ||
| + | # Required-Stop: | ||
| + | # Should-Stop: | ||
| + | # Default-Start: 3 5 | ||
| + | # Default-Stop: 0 1 2 6 | ||
| + | # Short-Description: bridge | ||
| + | # Description: Start bridge | ||
| + | ### END INIT INFO | ||
| + | |||
| + | . /etc/rc.status | ||
| + | |||
| + | rc_reset | ||
| + | |||
| + | case "$1" in | ||
| + | start) | ||
| + | echo -n "Starting bridge " | ||
| + | |||
| + | ################################# | ||
| + | iptables -F | ||
| + | iptables -X | ||
| + | iptables -t nat -F | ||
| + | iptables -t nat -X | ||
| + | iptables -t mangle -F | ||
| + | iptables -t mangle -X | ||
| + | iptables -P INPUT ACCEPT | ||
| + | iptables -P FORWARD ACCEPT | ||
| + | iptables -P OUTPUT ACCEPT | ||
| + | |||
| + | echo 1 > /proc/sys/net/ipv4/ip_forward | ||
| + | |||
| + | INTDEV="br1" | ||
| + | EXTDEV="eth0" | ||
| + | INTERN=10.0.0.10 | ||
| + | EXTERN=193.170.221.4 | ||
| + | |||
| + | ## NAT-Regeln ## | ||
| + | # Zugriff nach außen | ||
| + | iptables -t nat -A POSTROUTING -o $EXTDEV -s $INTERN -j SNAT --to-source $EXTERN | ||
| + | # Zugriff von außen | ||
| + | iptables -t nat -A PREROUTING -i $EXTDEV -p tcp -d $EXTERN -m multiport --dport 25,53,80,110,443,8080 -j DNAT --to-destination $INTERN | ||
| + | |||
| + | ## Firewall-Regeln == | ||
| + | # Akzeptiere alle aufgebauten Verbindungen | ||
| + | iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT | ||
| + | iptables -t nat -A POSTROUTING -j MASQUERADE | ||
| + | |||
| + | ################################# | ||
| + | rc_status -v | ||
| + | ;; | ||
| + | stop) | ||
| + | echo -n "Shutting down bridge " | ||
| + | |||
| + | iptables -F | ||
| + | iptables -X | ||
| + | iptables -t nat -F | ||
| + | iptables -t nat -X | ||
| + | iptables -t mangle -F | ||
| + | iptables -t mangle -X | ||
| + | iptables -P INPUT ACCEPT | ||
| + | iptables -P FORWARD ACCEPT | ||
| + | iptables -P OUTPUT ACCEPT | ||
| + | |||
| + | ################################# | ||
| + | |||
| + | rc_status -v | ||
| + | ;; | ||
| + | restart) | ||
| + | $0 stop | ||
| + | $0 start | ||
| + | |||
| + | rc_status | ||
| + | ;; | ||
| + | *) | ||
| + | echo "Usage: $0 {start|stop|restart}" | ||
| + | exit 1 | ||
| + | ;; | ||
| + | esac | ||
| + | rc_exit | ||
| + | </code> | ||
| + | |||
| + | *Alternativ, z.B. Mailserver, der nur intern steht: Fetchmail/Sendmail über entfernten anderen POP3/SMTP Server (falls kein Zugriff auf Router/Proxy/Telekom Kasterl) | ||