OPNsense Forum

English Forums => General Discussion => Topic started by: Zapp on September 01, 2016, 11:45:11 pm

Title: Portforward WAN->LAN based on FQDN or hostname?
Post by: Zapp on September 01, 2016, 11:45:11 pm
Q: Is it possible to set up portforwarding from WAN to LAN based on incoming FQDN? I'd like a.b.com on port 443 to go to machine a.local and x.b.com port 443 go to machine c.local. Can that be configured on OPNSenese?

(I'd like to setup the OpenVPN server on port 443 to not get blocked everywhere there is free WiFi)

   /Jonas...
Title: Re: Portforward WAN->LAN based on FQDN or hostname?
Post by: franco on September 02, 2016, 08:08:07 am
Hi Jonas,

You'll need two host aliases, then you can use them in the forwarding under "source" (hidden behind the "advanced" button). But keep in mind that hostnames are resolved on a best effort basis, meaning they have to be translated to IP addresses and in order to get that interval shortened (typically a day) you will need to add a cron job for it in the respective GUI area (System: Settings: Cron).


Cheers,
Franco
Title: Re: Portforward WAN->LAN based on FQDN or hostname?
Post by: Zapp on September 02, 2016, 09:52:32 am
Thanks. I'll give it a try later now that I know it might be possible.

   /Jonas...