update from server

This commit is contained in:
creme 2020-01-16 14:40:37 +00:00
parent 7c54e2af5b
commit 6084f85d1e
4 changed files with 22 additions and 9 deletions

View File

@ -201,6 +201,8 @@ if [ "$1" = "start" ]; then
# => apache2 proxy (http/https) # => apache2 proxy (http/https)
$IPT -w -t nat -A PREROUTING -d 5.199.130.141 -p tcp --dport 22 -j DNAT --to-destination 192.168.1.10:22 $IPT -w -t nat -A PREROUTING -d 5.199.130.141 -p tcp --dport 22 -j DNAT --to-destination 192.168.1.10:22
$IPT -w -A FORWARD -p tcp -d 192.168.1.10 --dport 22 -j ACCEPT $IPT -w -A FORWARD -p tcp -d 192.168.1.10 --dport 22 -j ACCEPT
#
$IPT -w -t nat -A POSTROUTING -d 192.168.1.3 -s 192.168.1.10 -j SNAT --to 5.199.130.141
$IPT -w -t nat -A POSTROUTING ! -d 192.168.1.0/24 -s 192.168.1.10 -j SNAT --to 5.199.130.141 $IPT -w -t nat -A POSTROUTING ! -d 192.168.1.0/24 -s 192.168.1.10 -j SNAT --to 5.199.130.141
# searx # searx
@ -209,10 +211,12 @@ if [ "$1" = "start" ]; then
# cryptpad # cryptpad
# => apache2 proxy (http/https) # => apache2 proxy (http/https)
$IPT -w -t nat -A POSTROUTING -d 192.168.1.3 -s 192.168.1.12 -j SNAT --to 89.163.145.170
$IPT -w -t nat -A POSTROUTING ! -d 192.168.1.0/24 -s 192.168.1.12 -j SNAT --to 89.163.145.170 $IPT -w -t nat -A POSTROUTING ! -d 192.168.1.0/24 -s 192.168.1.12 -j SNAT --to 89.163.145.170
# drone # drone
# => apache2 proxy (http/https) # => apache2 proxy (http/https)
$IPT -w -t nat -A POSTROUTING -d 192.168.1.3 -s 192.168.1.13 -j SNAT --to 5.199.130.141
$IPT -w -t nat -A POSTROUTING ! -d 192.168.1.0/24 -s 192.168.1.13 -j SNAT --to 5.199.130.141 $IPT -w -t nat -A POSTROUTING ! -d 192.168.1.0/24 -s 192.168.1.13 -j SNAT --to 5.199.130.141
# matrix # matrix
@ -228,6 +232,7 @@ if [ "$1" = "start" ]; then
$IPT -w -t nat -A PREROUTING -d 89.163.145.170 -p udp --dport 64000:65535 -j DNAT --to-destination 192.168.1.14 --sport 64000:65535 $IPT -w -t nat -A PREROUTING -d 89.163.145.170 -p udp --dport 64000:65535 -j DNAT --to-destination 192.168.1.14 --sport 64000:65535
$IPT -w -A FORWARD -p udp -d 192.168.1.14 --dport 64000:65535 -j ACCEPT $IPT -w -A FORWARD -p udp -d 192.168.1.14 --dport 64000:65535 -j ACCEPT
# #
$IPT -w -t nat -A POSTROUTING -d 192.168.1.3 -s 192.168.1.14 -j SNAT --to 89.163.145.170
$IPT -w -t nat -A POSTROUTING ! -d 192.168.1.0/24 -s 192.168.1.14 -j SNAT --to 89.163.145.170 $IPT -w -t nat -A POSTROUTING ! -d 192.168.1.0/24 -s 192.168.1.14 -j SNAT --to 89.163.145.170
# 0x0 # 0x0
@ -238,6 +243,7 @@ if [ "$1" = "start" ]; then
# rss # rss
# => apache2 proxy (http/https) # => apache2 proxy (http/https)
$IPT -w -t nat -A POSTROUTING -d 192.168.1.3 -s 192.168.1.16 -j SNAT --to 89.163.145.170
$IPT -w -t nat -A POSTROUTING ! -d 192.168.1.0/24 -s 192.168.1.16 -j SNAT --to 89.163.145.170 $IPT -w -t nat -A POSTROUTING ! -d 192.168.1.0/24 -s 192.168.1.16 -j SNAT --to 89.163.145.170
# pb # pb

View File

@ -52,6 +52,12 @@ server {
} }
# matrix # matrix
location /.well-known/matrix/ {
add_header Access-Control-Allow-Origin *;
add_header Content-Type application/json;
return 200 '{"m.server": "envs.net:8448", "m.homeserver": {"base_url": "https://envs.net"}}';
}
location /_matrix { location /_matrix {
include proxy_params; include proxy_params;
proxy_ssl_name $http_host; proxy_ssl_name $http_host;
@ -59,11 +65,12 @@ server {
proxy_pass https://matrix.envs.net; proxy_pass https://matrix.envs.net;
} }
location /.well-known/matrix/ { location /_synapse {
add_header Access-Control-Allow-Origin *; include proxy_params;
add_header Content-Type application/json; proxy_ssl_name $http_host;
return 200 '{"m.server": "envs.net:8448", "m.homeserver": {"base_url": "https://matrix.envs.net"}}'; proxy_ssl_server_name on;
} proxy_pass https://matrix.envs.net;
}
# users # users
location ~ ^/(~|u/)(?<user>[\w-]+)(?<user_uri>/.*)?$ { location ~ ^/(~|u/)(?<user>[\w-]+)(?<user_uri>/.*)?$ {

View File

@ -3,7 +3,7 @@ server {
include snippets/listen_local.conf; include snippets/listen_local.conf;
include snippets/listen.conf; include snippets/listen.conf;
# include snippets/ddos_def.conf; # include snippets/ddos_def.conf;
server_name help.envs.net; server_name help.envs.net howto.envs.net;
return 307 https://$host$request_uri; return 307 https://$host$request_uri;
} }
@ -12,7 +12,7 @@ server {
include snippets/listen_local_ssl.conf; include snippets/listen_local_ssl.conf;
include snippets/listen_ssl.conf; include snippets/listen_ssl.conf;
# include snippets/ddos_def.conf; # include snippets/ddos_def.conf;
server_name help.envs.net; server_name help.envs.net howto.envs.net;
include snippets/ssl.conf; include snippets/ssl.conf;
include ssl/envs_net_wild.conf; include ssl/envs_net_wild.conf;

View File

@ -2,7 +2,7 @@
server { server {
include snippets/listen.conf; include snippets/listen.conf;
# include snippets/ddos_mid.conf; # include snippets/ddos_mid.conf;
server_name pb.envs.net pastebin.envs.net; server_name pb.envs.net paste.envs.net pastebin.envs.net;
return 307 https://$host$request_uri; return 307 https://$host$request_uri;
} }
@ -11,7 +11,7 @@ server {
server { server {
include snippets/listen_ssl.conf; include snippets/listen_ssl.conf;
# include snippets/ddos_mid.conf; # include snippets/ddos_mid.conf;
server_name pb.envs.net pastebin.envs.net; server_name pb.envs.net paste.envs.net pastebin.envs.net;
include snippets/ssl.conf; include snippets/ssl.conf;
include ssl/envs_net_wild.conf; include ssl/envs_net_wild.conf;