no way to compare when less than two revisions
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
— | server_und_serverdienste:linux_als_router_mit_umts_und_wlan [2017/04/01 18:34] (aktuell) – angelegt admin | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ====== Linux als Router mit UMTS und WLAN ====== | ||
+ | |||
+ | Die Konfiguration gestaltet sich hier relativ einfach. Man installiert ein Kommandozeilensystem und installiert sich noch folgende Pakete nach falls sie nicht existieren: | ||
+ | | ||
+ | apt-get install iptables -y | ||
+ | apt-get remove ufw -y | ||
+ | | ||
+ | |||
+ | Wir gehen hier von einem Ubuntu 12.04 Router aus mit 2 Netzwerkschnittstellen. | ||
+ | eth0 = intern | ||
+ | eth1 = extern | ||
+ | |||
+ | Routing freischalten | ||
+ | | ||
+ | nano / | ||
+ | | ||
+ | net.ipv4.ip_forward=1 | ||
+ | net.ipv6.conf.all.forwarding=1 | ||
+ | |||
+ | IPTABLES in Webmin auf NAT aktivieren, auf eth1 | ||
+ | Als temporärer Befehl wäre | ||
+ | | ||
+ | iptables -A FORWARD -o wlx9cd643001c0d -i ens18 -s 192.168.2.0/ | ||
+ | iptables -t nat -A POSTROUTING -o wlx9cd643001c0d -j MASQUERADE | ||
+ | #iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE # würde hier auch alles über eine auf den Router aufgebaute Verbindung an das richtige Ziel weiter leiten | ||
+ | |||
+ | | ||
+ | #iptables -P FORWARD ACCEPT | ||
+ | |||
+ | Die Interfaces sollten dann so ausehen. | ||
+ | | ||
+ | # This file describes the network interfaces available on your system | ||
+ | # and how to activate them. For more information, | ||
+ | | ||
+ | # The loopback network interface | ||
+ | auto lo eth0 eth1 | ||
+ | iface lo inet loopback | ||
+ | | ||
+ | # The primary network interface | ||
+ | iface eth0 inet static | ||
+ | address 192.168.2.1 | ||
+ | netmask 255.255.255.0 | ||
+ | dns-nameservers 127.0.0.1 8.8.8.8 | ||
+ | post-up iptables-restore < / | ||
+ | iface eth0 inet6 static | ||
+ | address 2001: | ||
+ | netmask 64 | ||
+ | gateway 2001: | ||
+ | iface eth1 inet dhcp | ||
+ | |||
+ | |||
+ | OLD CONFIG | ||
+ | ---- | ||
+ | |||
+ | Event. braucht noch das Paket " | ||
+ | echo " | ||
+ | Möchte man einen PC freigeben würde sich der Befehl so gestalten: | ||
+ | iptables -t nat -A POSTROUTING -s 172.16.20.54/ | ||
+ | |||
+ | |||
+ | ====== Links ====== | ||
+ | |||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// |