Last active
September 26, 2018 15:21
-
-
Save gdamjan/0112b58ad056cf6d8553 to your computer and use it in GitHub Desktop.
Home network setup with a bridged wifi (for my libvirt VMs) using systemd-networkd and wpa_supplicant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /etc/systemd/network/50-wifi.link | |
| [Match] | |
| MACAddress=f8:d1:11:18:81:c3 | |
| Type=wlan | |
| [Link] | |
| NamePolicy=mac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /etc/systemd/network/50-wifi.network | |
| [Match] | |
| MACAddress=f8:d1:11:18:81:c3 | |
| Type=wlan | |
| [Network] | |
| Bridge=bridge0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /etc/udev/rules.d/95-wifi-4addr-mode.rules | |
| ACTION=="add", ATTRS{idVendor}=="0cf3", ATTRS{idProduct}=="9271", RUN+="/usr/bin/iw dev $name set 4addr on" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /etc/systemd/network/bridge0.netdev | |
| [NetDev] | |
| Name=bridge0 | |
| Kind=bridge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /etc/systemd/network/bridge0.network | |
| [Match] | |
| Name=bridge0 | |
| [Network] | |
| DHCP=both |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /etc/systemd/network/enp4s0.network | |
| [Match] | |
| Name=enp4s0 | |
| [Network] | |
| Bridge=bridge0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=WPA supplicant daemon (home) | |
| After=sys-subsystem-net-devices-bridge0.device network.target | |
| Requires=sys-subsystem-net-devices-bridge0.device | |
| [Service] | |
| Type=simple | |
| User=nobody | |
| SupplementaryGroups=rfkill | |
| CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW | |
| AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW | |
| RuntimeDirectory=wpa_supplicant | |
| ExecStart=/usr/bin/wpa_supplicant -c/etc/wpa_supplicant/home.conf -bbridge0 -iwlxf8d1111881c3 -q | |
| [Install] | |
| WantedBy=sys-subsystem-net-devices-wlxf8d1111881c3.device |
Author
gdamjan
commented
Jul 20, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment