# DO NOT EDIT THIS FILE -- OPNsense auto-generated fileext_addr = REDACTEDlog state changeslog connectiontable <apu2> { 192.168.1.96 }table <syno> { 192.168.1.12 }http protocol "www" { match header log "Host" match header log "X-Forwarded-For" match header log "User-Agent" match header log "Referer" match url log match request header set "X-Forwarded-For" value "$REMOTE_ADDR" match request header set "X-Forwarded-By" value "$SERVER_ADDR:$SERVER_PORT" tcp { nodelay, socket buffer 65536, backlog 100 } http websockets pass request quick header "Host" value "*.domain1" forward to <syno> pass request quick header "Host" value "*.domain2" forward to <apu2> block}http protocol "wwwtls" { match header log "Host" match header log "X-Forwarded-For" match header log "User-Agent" match header log "Referer" match url log match header set "X-Forwarded-For" value "$REMOTE_ADDR" match header set "X-Forwarded-By" value "$SERVER_ADDR:$SERVER_PORT" match header set "Keep-Alive" value "$TIMEOUT" http websockets tls keypair domain1 tls keypair domain2 tcp { nodelay, socket buffer 65536, backlog 100 } match request header set "X-Forwarded-Proto" value "http" pass request quick header "Host" value "*.domain1" forward to <syno> pass request quick header "Host" value "*.domain2" forward to <apu2> block}relay "www" { listen on $ext_addr port 80 protocol "www" forward to <apu2> port 80 check tcp forward to <syno> port 180 check tcp }relay "wwwtls" { listen on $ext_addr port 443 tls protocol "wwwtls" forward to <syno> port 180 check tcp forward to <apu2> port 80 check tcp }
match response header set "Connection" value "close"
# DO NOT EDIT THIS FILE -- OPNsense auto-generated fileext_addr = 0.0.0.0log state changeslog connectiontable <apu2> { 192.168.1.96 }table <syno> { 192.168.1.12 }http protocol "www" { match header log "Host" match header log "X-Forwarded-For" match header log "User-Agent" match header log "Referer" match url log match request header set "X-Forwarded-For" value "$REMOTE_ADDR" match request header set "X-Forwarded-By" value "$SERVER_ADDR:$SERVER_PORT" tcp { nodelay, socket buffer 65536, backlog 100 } pass request quick header "Host" value "*.domain1" forward to <syno> pass request quick header "Host" value "*.domain2" forward to <apu2> return error block}http protocol "wwwtls" { match header log "Host" match header log "X-Forwarded-For" match header log "User-Agent" match header log "Referer" match url log match header set "X-Forwarded-For" value "$REMOTE_ADDR" match header set "X-Forwarded-By" value "$SERVER_ADDR:$SERVER_PORT" match header set "Keep-Alive" value "$TIMEOUT" http websockets match request header "Connection" value "*Upgrade*" tag "ws" tls keypair domain1 tls keypair domain2 tcp { nodelay, socket buffer 65536, backlog 100 } match request header set "X-Forwarded-Proto" value "http" match response header set "Connection" value "close" match response tagged "ws" header set "Connection" value "keep-alive, Upgrade" pass request quick header "Host" value "*.domain1" forward to <syno> pass request quick header "Host" value "*.domain2" forward to <apu2> return error block}relay "www" { listen on $ext_addr port 80 protocol "www" forward to <apu2> port 80 check tcp forward to <syno> port 180 check tcp }relay "wwwtls" { listen on $ext_addr port 443 tls protocol "wwwtls" forward to <apu2> port 80 check tcp forward to <syno> port 180 check tcp }