Nmcli Hotspot: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
K (Thomas.will verschob die Seite Nmcli Hotpress nach Nmcli Hotspot) |
|||
| Zeile 12: | Zeile 12: | ||
Connection 'Hotspot' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/4) | 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) | 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.1.0/24 -j MASQUERADE | ||
| + | ==Forwarding einschalten== | ||
| + | *sysctl -w net.ipv4.ip_forward=1 | ||
Version vom 7. März 2023, 14:16 Uhr
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 2 ⨯
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.1.0/24 -j MASQUERADE
Forwarding einschalten
- sysctl -w net.ipv4.ip_forward=1