Skip to content

Commit

Permalink
Enable pcscd, routing adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
jari-hodju committed Nov 6, 2024
1 parent 5934a82 commit 6d2c0ea
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
11 changes: 6 additions & 5 deletions hardware/fmo-os-rugged-laptop-7330.nix
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@
];
};
# Route traffic to adaptervm
interfaces.ethint0.ipv4.routes = [
{address = "192.168.133.0"; prefixLength = 24; via = "192.168.101.12";}
{address = "172.24.0.13"; prefixLength = 32; via = "192.168.101.12";}
];
localCommands = ''
ip route add 192.168.133.0/24 via 192.168.101.12 dev ethint0
ip route add 172.24.0.13/32 via 192.168.101.12 dev ethint0
'';
firewall = {
extraCommands = ''
iptables -t nat -A PREROUTING -p udp -s 192.168.128.220 -j DNAT --to-destination 172.24.0.13
iptables -t nat -A OUTPUT -p udp --sport 22223 -j DNAT --to-destination 172.24.0.13
iptables -t nat -A POSTROUTING -p udp -d 172.24.0.13 -j MASQUERADE
'';
};
Expand Down Expand Up @@ -491,6 +491,7 @@
ip_path = "/var/lib/fogdata";
post_install_path = "/var/lib/fogdata/certs";
}; # services.registration-agent-laptop
pcscd.enable = true;
}; # services
networking.firewall.enable = false;
}]; # extraModules
Expand Down
11 changes: 6 additions & 5 deletions hardware/fmo-os-rugged-tablet-7230.nix
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@
];
};
# Route traffic to adaptervm
interfaces.ethint0.ipv4.routes = [
{address = "192.168.133.0"; prefixLength = 24; via = "192.168.101.12";}
{address = "172.24.0.13"; prefixLength = 32; via = "192.168.101.12";}
];
localCommands = ''
ip route add 192.168.133.0/24 via 192.168.101.12 dev ethint0
ip route add 172.24.0.13/32 via 192.168.101.12 dev ethint0
'';
firewall = {
extraCommands = ''
iptables -t nat -A PREROUTING -p udp -s 192.168.128.220 -j DNAT --to-destination 172.24.0.13
iptables -t nat -A OUTPUT -p udp --sport 22223 -j DNAT --to-destination 172.24.0.13
iptables -t nat -A POSTROUTING -p udp -d 172.24.0.13 -j MASQUERADE
'';
};
Expand Down Expand Up @@ -471,6 +471,7 @@
ip_path = "/var/lib/fogdata";
post_install_path = "/var/lib/fogdata/certs";
}; # services.registration-agent-laptop
pcscd.enable = true;
}; # services
networking.firewall.enable = false;
}]; # extraModules
Expand Down

0 comments on commit 6d2c0ea

Please sign in to comment.