DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 29th September 2022
billy_bazooka billy_bazooka is offline
Port Guard
 
Join Date: Sep 2016
Posts: 31
Default relayd how to https to local webserver at port 8080?

I know this is supposed to be simple, but I can't seem to make it work.

I have a local webserver running at port 8080.
It is not httpd.

I have certs for my website (lets say badda.bing.org) all set up.
How to use relayd to send all browser requests from https://badda.bing.org to my local webserver running at port 8080?

Code:
http protocol "https-secure-headers" {
  match header set "X-Forwarded-For" value "$REMOTE_ADDR"
  match header set "X-Forwarded-By" value "$SERVER_ADDR:$SERVER_PORT"
  pass
  tls keypair badda.bing.org
}

relay "tls-to-http" {
  listen on $ipv4 port 443 tls
  protocol "https-secure-headers"
  forward to $LOCALHOST port 80
}
What am I doing wrong? How to make this work?
Thanks.
Reply With Quote
  #2   (View Single Post)  
Old 29th September 2022
billy_bazooka billy_bazooka is offline
Port Guard
 
Join Date: Sep 2016
Posts: 31
Default

Code:
ip4="xxx.xxx.xxx.xxx"

table <service1> { 127.0.0.1 }
log connection

http protocol https {
        match request header append "X-Forwarded-For" value "$REMOTE_ADDR"
        match request header append "X-Forwarded-By" value "$SERVER_ADDR:$SERVER_PORT"
        match request header set "Connection" value "close"
        tcp { sack, backlog 128 }
        tls { keypair badda.bing.org }
        match request header "Host" value "badda.bing.org" forward to <service1>
}

relay wwwtls {
        listen on $ip4 port 443 tls
        protocol https
        forward to <service1> port 8080 check icmp
}
It seems this one is working.
https request get me my website, yes it is working.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Relayd as a HTTPS client e1-531g OpenBSD Security 4 11th January 2016 07:11 PM
Best way to do webserver permissions for multiuser? KintaroBC OpenBSD General 5 10th July 2013 07:24 AM
Local BOX Port Foward Problem paul-lkw FreeBSD Security 6 7th February 2009 06:47 PM
Maintenance free webserver Yuka FreeBSD General 1 29th November 2008 10:36 PM
Webserver email queue Yuka FreeBSD General 5 12th November 2008 12:52 AM


All times are GMT. The time now is 05:08 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick