Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: DanB35 on September 29, 2016, 09:07:46 PM

Title: SME server behind pfSense router/firewall
Post by: DanB35 on September 29, 2016, 09:07:46 PM
I've been running my SME 9 server in server/gateway mode, but have decided to transition the routing duties to a pfSense box. I still want the SME box to handle mail, web, and the other services I've been using.  Am I right in thinking that all I need to do is

1. Set the server to server-only mode, and
2. Forward ports 25, 80, 110, 143, 443, 993, and 995 from the pfSense box to the SME box?
Title: Re: SME server behind pfSense router/firewall
Post by: Stefano on September 29, 2016, 09:09:28 PM
you're right.. BTW, ports you listed above are only for mail/web services
Title: Re: SME server behind pfSense router/firewall
Post by: DanB35 on September 29, 2016, 09:13:53 PM
Are there any other ports that should be forwarded to a standard SME server?  I'm running OpenVPN on it, but I'll be moving that to the router. I'm pondering ssh, but leaning toward leaving that closed to the outside, and using the VPN first if I need to ssh.
Title: Re: SME server behind pfSense router/firewall
Post by: Stefano on September 29, 2016, 09:16:40 PM
in my personal experience, ssh on not standard posr > 1024 and with key auth is secure enough.. and you don't see your logs filled with failed logins from script kiddies..

just be aware that in server only mode you have to set to public access many services

I have many SME behind some nat/firewalling devices.. never had an issue..
Title: Re: SME server behind pfSense router/firewall
Post by: Knuddi on September 29, 2016, 10:05:34 PM
I have also relied on additional firewall for years and run my SME's in server-only mode. As I only allow IMAP and SSMTP I have not opened up for POP3 (143/443) but 465 and 993 (IMAPS).
Title: Re: SME server behind pfSense router/firewall
Post by: DanB35 on September 29, 2016, 10:32:48 PM
POP3 is 110, POP3S is 995. IMAP is 143, IMAPS is 993. 443 is HTTPS, and 465 is something to do with mail delivery (and I should add that to the list to open). I have a couple of remote users who might use POP3, so I might as well leave that open too.
Title: Re: SME server behind pfSense router/firewall
Post by: janet on September 30, 2016, 02:36:55 AM
DanB35

Strongly suggest you only use secure mail services ie IMAPS POPS etc.
Do not open ports & forward non secure versions of those services.

Also only use ssh private public key access, more secure than VPN.

Quote
....... so I might as well leave that open too.
Title: Re: SME server behind pfSense router/firewall
Post by: DanB35 on September 30, 2016, 02:41:57 AM
Also only use ssh private public key access, more secure than VPN.
SSH with public key access is more secure than OpenVPN with public key-authenticated access?
Title: Re: SME server behind pfSense router/firewall
Post by: guest22 on September 30, 2016, 03:00:47 AM
Tip:  config show |grep 'TCP\|UDP'
will show you all 'defined' ports. Not if they are open/closed, just defined.
Title: Re: SME server behind pfSense router/firewall
Post by: CharlieBrady on September 30, 2016, 03:08:11 PM
just be aware that in server only mode you have to set to public access many services

You only set public access to services which you want to be public. This is true whether you use server only mode or servergateway mode.
Title: Re: SME server behind pfSense router/firewall
Post by: Stefano on September 30, 2016, 03:17:39 PM
You only set public access to services which you want to be public. This is true whether you use server only mode or servergateway mode.

well, you're right.. and setting access as public for a service without a port forward is not so useful ;-)
Title: Re: SME server behind pfSense router/firewall
Post by: janet on October 01, 2016, 01:52:24 AM
DanB35

Quote
SSH with public key access is more secure than OpenVPN with public key-authenticated access?

I did not say that.
I was referring to ssh ppkey being more secure than VPN with ssh password (you did not previously mention you were using ssh secure key)
Title: Re: SME server behind pfSense router/firewall
Post by: DanB35 on October 01, 2016, 02:02:57 AM
I was referring to ssh ppkey being more secure than VPN with ssh password (you did not previously mention you were using ssh secure key)
I would expect, in general, that public key auth would beat password auth (though OpenVPN also allows you to do both--user/pass/public key; I think SSH does as well, but it isn't a supported configuration in SME).  If I had to choose between ssh and a VPN, I'd prefer the VPN, as it makes it quite a bit easier to access other resources on my LAN, but if there's a significant security difference that could change the plans.
Title: Re: SME server behind pfSense router/firewall
Post by: janet on October 01, 2016, 06:32:24 AM
I would expect, in general, that public key auth would beat password auth (though OpenVPN also allows you to do both--user/pass/public key; I think SSH does as well, but it isn't a supported configuration in SME).  If I had to choose between ssh and a VPN, I'd prefer the VPN, as it makes it quite a bit easier to access other resources on my LAN, but if there's a significant security difference that could change the plans.

ssh tunnels (using ppkey) are usually a good secure option, depends what you want/need to do.
Title: Re: SME server behind pfSense router/firewall
Post by: DanB35 on October 03, 2016, 01:05:51 AM
I had planned on doing this next week, but my Proxmox host is behaving oddly with its network interfaces, so the job got moved up a bit to this afternoon.  It seems to be working well, and for some reason is routing traffic about 5x as fast as my SME VM was.  No complaints about that!