update for matrix

This commit is contained in:
creme 2020-01-11 13:59:34 +00:00
parent 3fea75aa36
commit 3613d80cc7
3 changed files with 43 additions and 4 deletions

View File

@ -220,10 +220,14 @@ if [ "$1" = "start" ]; then
#
$IPT -w -t nat -A PREROUTING -d 89.163.145.170 -p tcp --dport 8448 -j DNAT --to-destination 192.168.1.14:8448
$IPT -w -A FORWARD -p tcp -d 192.168.1.14 --dport 8448 -j ACCEPT
$IPT -w -t nat -A PREROUTING -d 89.163.145.170 -p tcp --dport 3478 -j DNAT --to-destination 192.168.1.14:3478
$IPT -w -A FORWARD -p tcp -d 192.168.1.14 --dport 3478 -j ACCEPT
$IPT -w -t nat -A PREROUTING -d 89.163.145.170 -p udp --dport 3478 -j DNAT --to-destination 192.168.1.14:3478
$IPT -w -A FORWARD -p udp -d 192.168.1.14 --dport 3478 -j ACCEPT
#
$IPT -w -t nat -A PREROUTING -d 89.163.145.170 -p udp --dport 5349 -j DNAT --to-destination 192.168.1.14:5349
$IPT -w -A FORWARD -p udp -d 192.168.1.14 --dport 5349 -j ACCEPT
$IPT -w -t nat -A PREROUTING -d 89.163.145.170 -p tcp --dport 5349 -j DNAT --to-destination 192.168.1.14:5349
$IPT -w -A FORWARD -p tcp -d 192.168.1.14 --dport 5349 -j ACCEPT
$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 -t nat -A POSTROUTING ! -d 192.168.1.0/24 -s 192.168.1.14 -j SNAT --to 89.163.145.170
# 0x0

View File

@ -59,6 +59,12 @@ server {
proxy_pass https://matrix.envs.net;
}
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://matrix.envs.net"}}';
}
# users
location ~ ^/(~|u/)(?<user>[\w-]+)(?<user_uri>/.*)?$ {
alias /home/$user/public_html$user_uri;

View File

@ -25,3 +25,32 @@ server {
proxy_pass https://matrix.envs.net;
}
}
### RIOT.ENVS.NET - WUI ###
server {
include snippets/listen.conf;
# include snippets/ddos_mid.conf;
server_name riot.envs.net;
return 307 https://$host$request_uri;
}
# SSL
server {
include snippets/listen_ssl.conf;
# include snippets/ddos_mid.conf;
server_name riot.envs.net;
include snippets/ssl.conf;
include ssl/envs_net_wild.conf;
error_log /var/log/nginx/matrix.envs.net-error.log crit;
location / {
include proxy_params;
proxy_ssl_name $http_host;
proxy_ssl_server_name on;
proxy_pass https://matrix.envs.net;
}
}