This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
vmware:vsan:vsanlab [2019/11/15 19:48] – [HW Clock] mschubi | vmware:vsan:vsanlab [2020/04/20 20:08] – [Raspi als WLAN Access Point und DHCP/DNS Server] mschubi | ||
---|---|---|---|
Line 8: | Line 8: | ||
Bei mir hat es nur für 1GB gereicht... | Bei mir hat es nur für 1GB gereicht... | ||
- | Um in der gesamten Infrastruktur DNS, DHCP u.s.w. zu haben, wird ein RaspberryPi eingesetzt. Der ist gleichzeitig WLAN Accesspoint, | + | Um in der gesamten Infrastruktur DNS, DHCP u.s.w. zu haben, wird ein RaspberryPi |
aus dem Internet laden kann. | aus dem Internet laden kann. | ||
Line 31: | Line 31: | ||
|**1**|RPI DS1307 RTC| z.B. AMAZON " | |**1**|RPI DS1307 RTC| z.B. AMAZON " | ||
+ | Gehäuseteile als STL und OpenSCAD: {{ : | ||
===== Raspi als WLAN Access Point und DHCP/DNS Server ===== | ===== Raspi als WLAN Access Point und DHCP/DNS Server ===== | ||
Line 36: | Line 37: | ||
Dieser sollte neben Ethernet auch gleichzeitig ein WLAN Access Point und ein WLAN Client sein. | Dieser sollte neben Ethernet auch gleichzeitig ein WLAN Access Point und ein WLAN Client sein. | ||
Hier eine Config von mir. eth0 und wlan0 sind die DNS/DHCP Netze. wlan0 ist Accesspoint. wlan1 (Edimax mini) ist WLAN Client. | Hier eine Config von mir. eth0 und wlan0 sind die DNS/DHCP Netze. wlan0 ist Accesspoint. wlan1 (Edimax mini) ist WLAN Client. | ||
+ | |||
+ | Hostname und ssh Key ändern | ||
+ | <code bash> | ||
+ | raspi-config | ||
+ | reboot | ||
+ | #/etc/hosts | ||
+ | 127.0.0.1 | ||
+ | 192.168.10.1 | ||
+ | # | ||
+ | rm / | ||
+ | dpkg-reconfigure openssh-server | ||
+ | service ssh restart | ||
+ | #/ | ||
+ | PermitRootLogin yes | ||
+ | PasswordAuthentication yes | ||
+ | # | ||
+ | touch /boot/ssh | ||
+ | </ | ||
Wir brauchen einige Pakete.... | Wir brauchen einige Pakete.... | ||
Line 110: | Line 129: | ||
</ | </ | ||
+ | Falls hostapd.service nicht startet (// | ||
+ | |||
+ | <code bash> | ||
+ | systemctl unmask hostapd | ||
+ | systemctl enable hostapd | ||
+ | systemctl start hostapd | ||
+ | </ | ||
In der bash Shell wird die Bridge gebaut | In der bash Shell wird die Bridge gebaut | ||
Line 143: | Line 169: | ||
wpa-ssid " | wpa-ssid " | ||
wpa-psk " | wpa-psk " | ||
+ | wireless-power off | ||
+ | ###check mit iw wlan1 get power_save | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | post-up iw dev wlan0 set power_save off | ||
+ | post-up iw dev wlan1 set power_save off | ||
</ | </ | ||
Line 148: | Line 181: | ||
Durch das // | Durch das // | ||
<code bash> | <code bash> | ||
+ | sysctl -w net.ipv4.ip_forward=1 | ||
+ | sysctl -w net.ipv4.conf.all.rp_filter=0 | ||
+ | sysctl -p | ||
+ | |||
iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE | iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE | ||
- | iptables -t nat -L | + | iptables -t nat -L -v -n |
+ | iptables-save > / | ||
</ | </ | ||
Line 188: | Line 226: | ||
Get-PowerCLIConfiguration | Get-PowerCLIConfiguration | ||
</ | </ | ||
+ | |||
+ | Die Powershell loggt wie Blöde in / | ||
+ | https:// | ||
+ | '' | ||
+ | |||
+ | :syslogtag, contains, " | ||
+ | |||
+ | bzw. | ||
+ | |||
+ | '' | ||
+ | |||
+ | Find out where $PSHOME is. My $PSHOME pointed to / | ||
+ | Create a file in $PSHOME named powershell.config.json. | ||
+ | Add the following JSON to the file: | ||
+ | { " | ||
+ | Other log levels are found here: https:// | ||
+ | |||
===== Raspi mit VLANs ===== | ===== Raspi mit VLANs ===== | ||
Line 335: | Line 390: | ||
hwclock -w | hwclock -w | ||
</ | </ | ||
+ | |||
+ | ===== Lighttpd als Info Server ===== | ||
+ | |||
+ | Nur für die Lab Umgebung eine kurze Info Seite. | ||
+ | |||
+ | <code bash> | ||
+ | |||
+ | apt-get install lighttpd | ||
+ | vi / | ||
+ | -> | ||
+ | server.modules = ( | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ) | ||
+ | |||
+ | server.document-root | ||
+ | server.upload-dirs | ||
+ | server.errorlog | ||
+ | server.pid-file | ||
+ | server.username | ||
+ | server.groupname | ||
+ | server.port | ||
+ | .... | ||
+ | |||
+ | fastcgi.server = ( " | ||
+ | " | ||
+ | " | ||
+ | ))) | ||
+ | |||
+ | <- | ||
+ | service lightttpd start | ||
+ | service lighttpd status | ||
+ | |||
+ | apt-get install php php-cgi | ||
+ | </ | ||
+ | |||
+ | ===== Samba einrichten ===== | ||
+ | |||
+ | <code bash> | ||
+ | apt-get install samba | ||
+ | mv / | ||
+ | vi / | ||
+ | |||
+ | -> | ||
+ | |||
+ | [global] | ||
+ | workgroup = workgroup | ||
+ | security = user | ||
+ | map to guest = Bad Password | ||
+ | |||
+ | [homes] | ||
+ | comment = Home Directories | ||
+ | browsable = no | ||
+ | read only = no | ||
+ | create mode = 0750 | ||
+ | |||
+ | [public] | ||
+ | path = / | ||
+ | public = yes | ||
+ | writable = yes | ||
+ | comment = www share | ||
+ | printable = no | ||
+ | guest ok = yes | ||
+ | |||
+ | <- | ||
+ | |||
+ | systemctl restart smbd.service | ||
+ | systemctl status smbd.service | ||
+ | </ | ||
+ | |||
+ | <code cmd> | ||
+ | net use W: \\rasp-dns\public | ||
+ | </ | ||
+ | |||
+ | ===== XRDP ===== | ||
+ | |||
+ | <code bash> | ||
+ | apt-get install xrdp | ||
+ | </ | ||
+ |