AP nmcli: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 21: | Zeile 21: | ||
=Netzwerkarbeiten[Bearbeiten]= | =Netzwerkarbeiten[Bearbeiten]= | ||
==Alles aus diesem LAN wird maskiert== | ==Alles aus diesem LAN wird maskiert== | ||
| − | *iptables -t nat -A POSTROUTING -s 192.168. | + | *iptables -t nat -A POSTROUTING -s 192.168.178.0/24 -j MASQUERADE |
| + | |||
==Forwarding einschalten== | ==Forwarding einschalten== | ||
*sysctl -w net.ipv4.ip_forward=1 | *sysctl -w net.ipv4.ip_forward=1 | ||
=Installation dnsmasq= | =Installation dnsmasq= | ||
*[[dnsmasq]] | *[[dnsmasq]] | ||
Aktuelle Version vom 23. März 2023, 13:08 Uhr
Installation
- Wir brauchen einen NetworkManager und eine Light Version von Name und DHCP Server
- apt update
- apt install dnsmasq
Host AP aktivieren
- nmcli dev wifi hotspot ifname wlan0 ssid test password "test1234"
Host IP Adresse setzen
- nmcli connection modify Hotspot ipv4.method manual ipv4.addresses 192.168.178.1/24
Wie heist der AP?
- nmcli connection show
NAME UUID TYPE DEVICE Wired connection 1 04ce7d80-e44b-4a8d-9305-b2ad8c72a590 ethernet eth0 Hotspot 64b34b3b-46af-44ba-80b3-e4f5119d85ee wifi wlan0*
Aktivieren
- nmcli connection down Hotspot ; nmcli connection up Hotspot
Connection 'Hotspot' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/4) Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/5)
Netzwerkarbeiten[Bearbeiten]
Alles aus diesem LAN wird maskiert
- iptables -t nat -A POSTROUTING -s 192.168.178.0/24 -j MASQUERADE
Forwarding einschalten
- sysctl -w net.ipv4.ip_forward=1