l prism.r: dedup with wirelum.nix
This commit is contained in:
parent
9e632ce490
commit
5d321689af
@ -297,37 +297,25 @@ with import <stockholm/lib>;
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
krebs.iptables.tables.filter.INPUT.rules = [
|
imports = [
|
||||||
{ predicate = "-p udp --dport 51820"; target = "ACCEPT"; }
|
<stockholm/lass/2configs/wirelum.nix>
|
||||||
];
|
|
||||||
krebs.iptables.tables.nat.PREROUTING.rules = [
|
|
||||||
{ v6 = false; precedence = 1000; predicate = "-s 10.244.1.0/24"; target = "ACCEPT"; }
|
|
||||||
];
|
];
|
||||||
|
#krebs.iptables.tables.nat.PREROUTING.rules = [
|
||||||
|
# { v6 = false; precedence = 1000; predicate = "-s 10.244.1.0/24"; target = "ACCEPT"; }
|
||||||
|
#];
|
||||||
krebs.iptables.tables.filter.FORWARD.rules = [
|
krebs.iptables.tables.filter.FORWARD.rules = [
|
||||||
{ v6 = false; precedence = 1000; predicate = "-s 10.244.1.0/24"; target = "ACCEPT"; }
|
{ v6 = false; precedence = 1000; predicate = "-s 10.244.1.0/24 -d 10.243.0.0/16"; target = "ACCEPT"; }
|
||||||
{ v6 = false; precedence = 1000; predicate = "-s 10.243.0.0/16 -d 10.244.1.0/24"; target = "ACCEPT"; }
|
{ v6 = false; precedence = 1000; predicate = "-s 10.243.0.0/16 -d 10.244.1.0/24"; target = "ACCEPT"; }
|
||||||
];
|
];
|
||||||
krebs.iptables.tables.nat.POSTROUTING.rules = [
|
krebs.iptables.tables.nat.POSTROUTING.rules = [
|
||||||
{ v6 = false; predicate = "-s 10.244.1.0/24 ! -d 10.244.1.0/24"; target = "MASQUERADE"; }
|
{ v6 = false; predicate = "-s 10.244.1.0/24 ! -d 10.244.1.0/24"; target = "MASQUERADE"; }
|
||||||
];
|
];
|
||||||
networking.wireguard.interfaces.wg0 = {
|
|
||||||
ips = [ "10.244.1.1/24" ];
|
|
||||||
listenPort = 51820;
|
|
||||||
privateKeyFile = (toString <secrets>) + "/wireguard.key";
|
|
||||||
allowedIPsAsRoutes = true;
|
|
||||||
peers = [
|
|
||||||
{
|
|
||||||
# lass-android
|
|
||||||
allowedIPs = [ "10.244.1.2/32" ];
|
|
||||||
publicKey = "zVunBVOxsMETlnHkgjfH71HaZjjNUOeYNveAVv5z3jw=";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
services.dnsmasq = {
|
services.dnsmasq = {
|
||||||
enable = true;
|
enable = true;
|
||||||
resolveLocalQueries = false;
|
resolveLocalQueries = false;
|
||||||
|
|
||||||
extraConfig= ''
|
extraConfig= ''
|
||||||
|
listen-address=10.244.1.1
|
||||||
except-interface=lo
|
except-interface=lo
|
||||||
interface=wg0
|
interface=wg0
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user