fail2ban proxmox webgui with nginx reverse proxy

Discussion in 'Mail Gateway: Installation and configuration' started by cybermcm, Jul 10, 2018.

  1. cybermcm

    cybermcm Member

    Joined:
    Aug 20, 2017
    Messages:
    84
    Likes Received:
    10
    I've setup a mail gateway 5.0-71 solution with a nginx reverse proxy one the same machine (using let's encrypt certificates). Everything works.
    Now I want to setup fail2ban to add a security layer (web GUI is currently reachable via Internet).
    Problem: In every logfile (daemon.log, syslog, pmgproxy.log) there is only 127.0.0.1 as source ip listed.

    Is there a way to log the real client ip?

    Thanks for any help in advance.
     
  2. heutger

    heutger Active Member

    Joined:
    Apr 25, 2018
    Messages:
    179
    Likes Received:
    54
    Why do you want to setup fail2ban and why to use a nginx reverse proxy? You can use certs also without nginx and if you want this acme thing doing with let's encrypt thing, there are explanations here to do so. For your web GUI look at my advancing thread and use a firewall to limit access to particular IP addresses or use my explanations to install OpenVPN, so the machine is only accessible via OpenVPN. It's easy and much safer than wait for hackers to fail2ban them.
     
  3. cybermcm

    cybermcm Member

    Joined:
    Aug 20, 2017
    Messages:
    84
    Likes Received:
    10
    Thanks for your reply and yes a firewall / OpenVPN are far more safe than fail2ban. Nevertheless I just want to know if it is possible to create a fail2ban filter for this setup...
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice