Route IPv6 traffic via valkyrie
This commit is contained in:
parent
d793308ebe
commit
654a8459eb
14 changed files with 58 additions and 18 deletions
|
|
@ -29,7 +29,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set_real_ip_from 10.202.41.100;
|
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||||
|
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||||
real_ip_header proxy_protocol;
|
real_ip_header proxy_protocol;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,8 @@
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
||||||
|
|
||||||
set_real_ip_from 10.202.41.100;
|
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||||
|
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||||
real_ip_header proxy_protocol;
|
real_ip_header proxy_protocol;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
@ -33,7 +34,8 @@
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
||||||
|
|
||||||
set_real_ip_from 10.202.41.100;
|
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||||
|
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||||
real_ip_header proxy_protocol;
|
real_ip_header proxy_protocol;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,8 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set_real_ip_from 10.202.41.100;
|
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||||
|
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||||
real_ip_header proxy_protocol;
|
real_ip_header proxy_protocol;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,8 @@
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
||||||
|
|
||||||
set_real_ip_from 10.202.41.100;
|
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||||
|
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||||
real_ip_header proxy_protocol;
|
real_ip_header proxy_protocol;
|
||||||
|
|
||||||
add_header Strict-Transport-Security "max-age=63072000" always;
|
add_header Strict-Transport-Security "max-age=63072000" always;
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set_real_ip_from 10.202.41.100;
|
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||||
|
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||||
real_ip_header proxy_protocol;
|
real_ip_header proxy_protocol;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,8 @@
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
||||||
|
|
||||||
set_real_ip_from 10.202.41.100;
|
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||||
|
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||||
real_ip_header proxy_protocol;
|
real_ip_header proxy_protocol;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
@ -80,7 +81,8 @@
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
||||||
|
|
||||||
set_real_ip_from 10.202.41.100;
|
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||||
|
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||||
real_ip_header proxy_protocol;
|
real_ip_header proxy_protocol;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
@ -103,7 +105,8 @@
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
||||||
|
|
||||||
set_real_ip_from 10.202.41.100;
|
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||||
|
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||||
real_ip_header proxy_protocol;
|
real_ip_header proxy_protocol;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,8 @@
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set_real_ip_from 10.202.41.100;
|
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||||
|
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||||
real_ip_header proxy_protocol;
|
real_ip_header proxy_protocol;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,8 @@
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
||||||
|
|
||||||
set_real_ip_from 10.202.41.100;
|
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||||
|
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||||
real_ip_header proxy_protocol;
|
real_ip_header proxy_protocol;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,8 @@
|
||||||
proxyPass = "http://${config.services.searx.settings.server.bind_address}:${builtins.toString config.services.searx.settings.server.port}";
|
proxyPass = "http://${config.services.searx.settings.server.bind_address}:${builtins.toString config.services.searx.settings.server.port}";
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set_real_ip_from 10.202.41.100;
|
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||||
|
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||||
real_ip_header proxy_protocol;
|
real_ip_header proxy_protocol;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -33,5 +33,31 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
streamConfig = ''
|
||||||
|
map $ssl_preread_server_name $address {
|
||||||
|
cloud.nekover.se 10.202.41.122:8443;
|
||||||
|
element.nekover.se 10.202.41.100:8443;
|
||||||
|
element-admin.nekover.se 10.202.41.100:8443;
|
||||||
|
fi.nekover.se 10.202.41.125:8443;
|
||||||
|
git.nekover.se 10.202.41.106:8443;
|
||||||
|
hydra.nekover.se 10.202.41.121:8443;
|
||||||
|
id.nekover.se 10.202.41.124:8443;
|
||||||
|
mas.nekover.se 10.202.41.112:8443;
|
||||||
|
matrix.nekover.se 10.202.41.112:8443;
|
||||||
|
matrix-rtc.nekover.se 10.202.41.112:8443;
|
||||||
|
mesh.nekover.se 10.202.41.126:8443;
|
||||||
|
nekover.se 10.202.41.100:8443;
|
||||||
|
nix-cache.nekover.se 10.202.41.121:8443;
|
||||||
|
searx.nekover.se 10.202.41.105:8443;
|
||||||
|
social.nekover.se 10.202.41.104:8443;
|
||||||
|
}
|
||||||
|
server {
|
||||||
|
listen [::]:443;
|
||||||
|
proxy_pass $address;
|
||||||
|
ssl_preread on;
|
||||||
|
proxy_protocol on;
|
||||||
|
}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@
|
||||||
}
|
}
|
||||||
server {
|
server {
|
||||||
listen 0.0.0.0:443;
|
listen 0.0.0.0:443;
|
||||||
listen [::]:443;
|
|
||||||
proxy_pass $address;
|
proxy_pass $address;
|
||||||
ssl_preread on;
|
ssl_preread on;
|
||||||
proxy_protocol on;
|
proxy_protocol on;
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ in
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
|
|
||||||
listen = [{
|
listen = [{
|
||||||
addr = "localhost";
|
addr = "0.0.0.0";
|
||||||
port = 8443;
|
port = 8443;
|
||||||
ssl = true;
|
ssl = true;
|
||||||
extraParameters = ["proxy_protocol"];
|
extraParameters = ["proxy_protocol"];
|
||||||
|
|
@ -86,7 +86,8 @@ in
|
||||||
# $remote_port to the client address and client port, when using proxy
|
# $remote_port to the client address and client port, when using proxy
|
||||||
# protocol.
|
# protocol.
|
||||||
# First set our proxy protocol proxy as trusted.
|
# First set our proxy protocol proxy as trusted.
|
||||||
set_real_ip_from 127.0.0.1;
|
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||||
|
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||||
# Then tell the realip_module to get the addreses from the proxy protocol
|
# Then tell the realip_module to get the addreses from the proxy protocol
|
||||||
# header.
|
# header.
|
||||||
real_ip_header proxy_protocol;
|
real_ip_header proxy_protocol;
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
listen = [{
|
listen = [{
|
||||||
addr = "localhost";
|
addr = "0.0.0.0";
|
||||||
port = 8443;
|
port = 8443;
|
||||||
ssl = true;
|
ssl = true;
|
||||||
extraParameters = ["proxy_protocol"];
|
extraParameters = ["proxy_protocol"];
|
||||||
|
|
@ -60,7 +60,8 @@ in
|
||||||
# redirect server error pages to the static page /50x.html
|
# redirect server error pages to the static page /50x.html
|
||||||
error_page 500 502 503 504 /50x.html;
|
error_page 500 502 503 504 /50x.html;
|
||||||
|
|
||||||
set_real_ip_from 127.0.0.1;
|
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||||
|
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||||
real_ip_header proxy_protocol;
|
real_ip_header proxy_protocol;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,8 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set_real_ip_from 127.0.0.1;
|
set_real_ip_from 10.202.41.100; # IPv4 from web-public-2
|
||||||
|
set_real_ip_from 10.203.10.3; # IPv6 from valkyrie
|
||||||
real_ip_header proxy_protocol;
|
real_ip_header proxy_protocol;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue