Ubuntu Pastebin

Paste from black at Fri, 16 Dec 2016 14:08:20 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# loopback-Interface nicht löschen
auto lo
iface lo inet loopback

# LAN / automatische Konfiguration über DHCP
auto p32p1
iface p32p1 inet dhcp

# WLAN mit statischer Konfiguration
auto wlan0
iface wlan0 inet static
address 192.168.3.1
netmask 255.255.255.0
broadcast 192.168.3.255

# vorhandene Regeln und Ketten zuerst löschen (Restart-Funktionalität)
up /sbin/iptables -F
 up /sbin/iptables -X
  up /sbin/iptables -t nat -F

# Maskieren der LAN-Schnittstelle, Port-Forwarding & Nat aktivieren
up iptables -A FORWARD -o p32p1 -i wlan0 -s 192.168.3.0/24 -m conntrack --ctstate NEW -j ACCEPT
 up iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
  up iptables -t nat -A POSTROUTING -o p32p1 -j MASQUERADE 
   up sysctl -w net.ipv4.ip_forward=1 
   up sysctl -w net.ipv6.ip_forward=1

# hostapd und dnsmasq neu starten
   up /etc/init.d/hostapd restart
    up /etc/init.d/dnsmasq restart
Download as text