summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-02-13 20:55:38 +0100
committertv <tv@krebsco.de>2016-02-13 20:59:54 +0100
commitd08dab713bdd5bb61e47ed5a53c4ef530e704599 (patch)
tree56f15412d8d343d173fdd3df017cdd18260e5e19
parent0bb63de57d48bb79518815a0ee1c5c4eea0f342c (diff)
xu-qemu0: setup qemubr0 address and route
-rw-r--r--tv/2configs/xu-qemu0.nix28
1 files changed, 13 insertions, 15 deletions
diff --git a/tv/2configs/xu-qemu0.nix b/tv/2configs/xu-qemu0.nix
index 205b1c0..4d39031 100644
--- a/tv/2configs/xu-qemu0.nix
+++ b/tv/2configs/xu-qemu0.nix
@@ -15,33 +15,31 @@ in
#
# make [install] system=xu-qemu0 target_host=10.56.0.101
-# TODO iptables -A INPUT -p udp -m udp --dport bootps -j ACCEPT
+# TODO iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
# TODO iptables -A FORWARD -i qemubr0 -s 10.56.0.1/24 -m conntrack --ctstate NEW -j ACCEPT
# TODO iptables -A POSTROUTING -t nat -j MASQUERADE
-# TODO iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
+# TODO iptables -A INPUT -i qemubr0 -p udp -m udp --dport bootps -j ACCEPT
# TODO iptables -A INPUT -i qemubr0 -p udp -m udp --dport domain -j ACCEPT
# TODO echo 1 > /proc/sys/net/ipv4/ip_forward
-# TODO ifconfig qemubr0 10.56.0.1/24 up
with lib;
{
- #networking.wireless.interfaces = [ "wlp3s0" ];
-
- #networking.useNetworkd = true;
-
- #networking.dhcpcd.allowInterfaces = [
- # "qemubr0"
- #];
-
- #systemd.network.networks.wlp3s0 = {
- # matchConfig.name = "wlp3s0";
- # networkConfig.Bridge = "qemubr0";
- #};
+ networking.dhcpcd.denyInterfaces = [ "qemubr0" ];
systemd.network.enable = true;
services.resolved.enable = mkForce false;
+ systemd.network.networks.qemubr0 = {
+ matchConfig.Name = "qemubr0";
+ address = ["10.56.0.1/24"];
+ routes = [{
+ routeConfig = {
+ Gateway = "*";
+ Destination = "10.56.0.0";
+ };
+ }];
+ };
systemd.network.netdevs.qemubr0 = {
netdevConfig = {
Name = "qemubr0";