Beiträge von Encore

    ein kleiner auszug der jail.conf - gekürzt da mehr als 10k zeichen

    jail.conf

    #

    # WARNING: heavily refactored in 0.9.0 release. Please review and

    # customize settings for your setup.

    #

    # Changes: in most of the cases you should not modify this

    # file, but provide customizations in jail.local file,

    # or separate .conf files under jail.d/ directory, e.g.:

    #

    # HOW TO ACTIVATE JAILS:

    #

    # YOU SHOULD NOT MODIFY THIS FILE.

    #

    # It will probably be overwritten or improved in a distribution update.

    #

    # Provide customizations in a jail.local file or a jail.d/customisation.local.

    # For example to change the default bantime for all jails and to enable the

    # ssh-iptables jail the following (uncommented) would appear in the .local file.

    # See man 5 jail.conf for details.

    #

    # [DEFAULT]

    # bantime = 1h

    #

    # [sshd]

    # enabled = true

    #

    # See jail.conf(5) man page for more information


    # Comments: use '#' for comment lines and ';' (following a space) for inline comments


    [INCLUDES]

    #before = paths-distro.conf

    before = paths-debian.conf

    # The DEFAULT allows a global definition of the options. They can be overridden

    # in each jail afterwards.

    [DEFAULT]

    #

    # MISCELLANEOUS OPTIONS

    #

    # "ignorself" specifies whether the local resp. own IP addresses should be ignored

    # (default is true). Fail2ban will not ban a host which matches such addresses.

    #ignorself = true

    # "ignoreip" can be a list of IP addresses, CIDR masks or DNS hosts. Fail2ban

    # will not ban a host which matches an address in this list. Several addresses

    # can be defined using space (and/or comma) separator.

    #ignoreip = 127.0.0.1/8 ::1

    # External command that will take an tagged arguments to ignore, e.g. <ip>,

    # and return true if the IP is to be ignored. False otherwise.

    #

    # ignorecommand = /path/to/command <ip>

    ignorecommand =

    # "bantime" is the number of seconds that a host is banned.

    bantime = 604800

    # A host is banned if it has generated "maxretry" during the last "findtime"

    # seconds.

    findtime = 302400

    # "maxretry" is the number of failures before a host get banned.

    # "backend" specifies the backend used to get files modification.

    # Available options are "pyinotify", "gamin", "polling", "systemd" and "auto".

    # This option can be overridden in each jail as well.

    #

    # pyinotify: requires pyinotify (a file alteration monitor) to be installed.

    # If pyinotify is not installed, Fail2ban will use auto.

    # gamin: requires Gamin (a file alteration monitor) to be installed.

    # If Gamin is not installed, Fail2ban will use auto.

    # polling: uses a polling algorithm which does not require external libraries.

    # systemd: uses systemd python library to access the systemd journal.

    # Specifying "logpath" is not valid for this backend.

    # See "journalmatch" in the jails associated filter config

    # auto: will try to use the following backends, in order:

    # pyinotify, gamin, polling.

    #

    # Note: if systemd backend is chosen as the default but you enable a jail

    # for which logs are present only in its own log files, specify some other

    # backend for that jail (e.g. polling) and provide empty value for

    # journalmatch. See https://github.com/fail2ban/fail2…omment-74901200

    backend = auto

    # "usedns" specifies if jails should trust hostnames in logs,

    # warn when DNS lookups are performed, or ignore all hostnames in logs

    #

    # yes: if a hostname is encountered, a DNS lookup will be performed.

    # warn: if a hostname is encountered, a DNS lookup will be performed,

    # but it will be logged as a warning.

    # no: if a hostname is encountered, will not be used for banning,

    # but it will be logged as info.

    # raw: use raw value (no hostname), allow use it for no-host filters/actions (example user)

    usedns = warn

    # "logencoding" specifies the encoding of the log files handled by the jail

    # This is used to decode the lines from the log file.

    # Typical examples: "ascii", "utf-8"

    #

    # auto: will use the system locale setting

    logencoding = auto

    # "enabled" enables the jails.

    # By default all jails are disabled, and it should stay this way.

    # Enable only relevant to your setup jails in your .local or jail.d/*.conf

    #

    # true: jail will be enabled and log files will get monitored for changes

    # false: jail is not enabled

    enabled = false


    # "mode" defines the mode of the filter (see corresponding filter implementation for more info).

    mode = normal

    # "filter" defines the filter to use by the jail.

    # By default jails have names matching their filter name

    #

    filter = %(__name__)s[mode=%(mode)s]


    #

    # ACTIONS

    #

    # Some options used for actions

    # Destination email address used solely for the interpolations in

    # jail.{conf,local,d/*} configuration files.

    destemail = noreply@playerx.de

    # Sender email address used solely for some actions

    sender = root@<fq-hostname>

    # E-mail action. Since 0.8.1 Fail2Ban uses sendmail MTA for the

    # mailing. Change mta configuration parameter to mail if you want to

    # revert to conventional 'mail'.

    mta = sendmail

    # Default protocol

    protocol = all

    # Specify chain where jumps would need to be added in ban-actions expecting parameter chain

    chain = <known/chain>

    # Ports to be banned

    # Usually should be overridden in a particular jail

    port = 0:65535

    # Format of user-agent https://tools.ietf.org/html/rfc7231#section-5.5.3

    fail2ban_agent = Fail2Ban/%(fail2ban_version)s

    #

    # Action shortcuts. To be used to define action parameter

    # Default banning action (e.g. iptables, iptables-new,

    # iptables-multiport, shorewall, etc) It is used to define

    # action_* variables. Can be overridden globally or per

    # section within jail.local file

    banaction = iptables

    banaction_allports = iptables-allports

    # The simplest action to take: ban only

    action_ = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]

    # ban & send an e-mail with whois report to the destemail.

    action_mw = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]

    %(mta)s-whois[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", protocol="%(protocol)s", chain="%(chain)s"]

    # ban & send an e-mail with whois report and relevant log lines

    # to the destemail.

    action_mwl = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]

    %(mta)s-whois-lines[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", logpath=%(logpath)s, chain="%(chain)s"]

    # See the IMPORTANT note in action.d/xarf-login-attack for when to use this action

    #

    # ban & send a xarf e-mail to abuse contact of IP address and include relevant log lines

    # to the destemail.

    action_xarf = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]

    xarf-login-attack[service=%(__name__)s, sender="%(sender)s", logpath=%(logpath)s, port="%(port)s"]

    # ban IP on CloudFlare & send an e-mail with whois report and relevant log lines

    # to the destemail.

    action_cf_mwl = cloudflare[cfuser="%(cfemail)s", cftoken="%(cfapikey)s"]

    %(mta)s-whois-lines[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", logpath=%(logpath)s, chain="%(chain)s"]

    # Report block via blocklist.de fail2ban reporting service API

    #

    # See the IMPORTANT note in action.d/blocklist_de.conf for when to use this action.

    # Specify expected parameters in file action.d/blocklist_de.local or if the interpolation

    # `action_blocklist_de` used for the action, set value of `blocklist_de_apikey`

    # in your `jail.local` globally (section [DEFAULT]) or per specific jail section (resp. in

    # corresponding jail.d/my-jail.local file).

    #

    action_blocklist_de = blocklist_de[email="%(sender)s", service=%(filter)s, apikey="%(blocklist_de_apikey)s", agent="%(fail2ban_agent)s"]

    # Report ban via badips.com, and use as blacklist

    #

    # See BadIPsAction docstring in config/action.d/badips.py for

    # documentation for this action.

    #

    # NOTE: This action relies on banaction being present on start and therefore

    # should be last action defined for a jail.

    #

    action_badips = badips.py[category="%(__name__)s", banaction="%(banaction)s", agent="%(fail2ban_agent)s"]

    #

    # Report ban via badips.com (uses action.d/badips.conf for reporting only)

    #

    action_badips_report = badips[category="%(__name__)s", agent="%(fail2ban_agent)s"]

    # Report ban via abuseipdb.com.

    #

    # See action.d/abuseipdb.conf for usage example and details.

    #

    action_abuseipdb = abuseipdb

    # Choose default action. To change, just override value of 'action' with the

    # interpolation to the chosen action shortcut (e.g. action_mw, action_mwl, etc) in jail.local

    # globally (section [DEFAULT]) or per specific section

    action = %(action_)s


    #

    # JAILS

    #

    #

    # SSH servers

    #

    [sshd]

    # To use more aggressive sshd modes set filter parameter "mode" in jail.local:

    # normal (default), ddos, extra or aggressive (combines all).

    # See "tests/files/logs/sshd" or "filter.d/sshd.conf" for usage example and details.

    #mode = normal

    port = ssh

    logpath = %(sshd_log)s

    backend = %(sshd_backend)s


    [dropbear]

    port = ssh

    logpath = %(dropbear_log)s

    backend = %(dropbear_backend)s


    [selinux-ssh]

    port = ssh

    logpath = %(auditd_log)s

    jail.conf

    Hey leute,

    server läuft soweit alles wunderbar, stehe seit geraumer Zeit allerdings vor dem Problem,

    dass Fail2Ban nicht richtig bannt.

    Im Log wird auch schön angezeigt " Bann >IP hier<"

    allerdings wird im endeffekt nicht gebannt.

    Selbsttest mit z.B. handy SSH erfolgte, die verbindung wird nicht zurückgewiesen oder gedropt.

    mit firewall-cmd ip set und alle mögl. variationen schon durchprobiert, ebenso firewalld runterschmissen und mit normalen iptables bann probiert, ebenso ohne erfolg...

    hat jemand ggfls eine Lösung dafür?

    oder stand vor dem selben problem und hat nen fix gefunden?

    Erstmal vielen Dank!

    Ja VPN läuft soweit alles gut, werde deine Anleitung heute abend mal testen und berichten.

    Darf man fragen wieso wire statt ovpn?

    Vorteile / Nachteile, ggfls für meine Zwecke besser? Würde bei openvpn die Verschlüsselung eh abschalten - frisst Performance und wird für meine Zwecke nicht benötigt da ab dem root - > Netz dort eh unverschlüsselt weiter geht.

    Hey zusammen,

    da mir die Dyndns lösung zu "einfach" ist, der basteltrieb auch iwie anschlägt, bräuchte ich hilfe bei folgender umsetzung:

    ich habe:

    VPS 100 mit openvpnaccess server auf debian 9 bei netcup

    Zuhause: fritzbox 7590 "als dummes gerät / passtrough" - dahinter am (wan asus router-> lan fritzbox) einen asus ac86u (exzelente vpn performance).

    Ziel: die feste IP des vps samt portanfragen von extern im internen Heimnetzwerk zu verteilen

    Beispiel: vpn client ist im asus router eingestellt, verbindet sich auch mit dem vpn server, unter wieistmeineip.de wird auch die ip des vps angezeigt - inet klappt also, verbindung ebenso.

    Nun wollte ich testweite zb auf dem rechner einen ts3 server testen - runtergeladen, gestartet - portforwarding 9987 udp auf meine interne (192.168.x.xx) - vergebene IP vom dhcp des asusrouters gemacht.

    wenn ich jetzt zb von nem externen gerät (smartphone mit ts3 app) die ip des "VPS" eingebe, dachte ich dass der vpn dann ins heimnetz weiterleitet und dort dann auf den "aktuell noch lokalen" ts server verbindet.

    allerdings tut er das nicht..

    habe das image von netcup genommen mit dem opvenvpn access server - wiegesagt, verbindung mit nem neu angelegten user usw klappt problemlos im asus router als vpn client.

    WAS muss ich tun, damit das routing <---> klappt?

    Würde amliebsten alle anfragen samt prots zb über den vpn ins heimnetz routen lassen, dort dann mittels nat + firewall das ganze filtern.. aber halt so das ich dann mit ner portweiterschaltung meine "dienste" ans laufen bekomme :)

    in der shell im debian habe ich noch nichts geändert -> image installiert, user angelegt -ovpn geladen, im asus eingerichtet, portweiterleitung für den ts port gemacht usw..

    möchte genau so ein szenario haben das ich quasi die feste ip des vps im kompletten heimnetz nutzen kann :) - kein dyndns, reverse proxy usw. - auch nicht "warum" :D würde es einfach gerne so haben wollen :,) (nicht böse gemeint)

    Anbindung zuhause: telekom 250/42 einwahl über ppoe

    falls jmd mir eine anleitung geben kann oder etwas unter die arme greiftr, wäre ich dankbar.


    edit: - möchte iwan vl nen kleinen lokalen heimserver haben, auf dem ne vm mit minecraft, ts, garrys mod, kleine website (mit serverdaten für die jeweiligen dienste) läuft. das ganze auch nicht 24/7 sondern für freunde, familie und zum spaß + experementieren.

    Sorry, was spricht gegen ne dynamische IP? Kannst doch über deinen Router automatisch nen Script auf deinem VPS aufrufen und via netcup API DNS Records ändern.

    Bei mir läuft auch auf nem mini web hosting hier nen DynDNS. Das passende Script gibt's sogar direkt bei github. So sind eigentlich alle meine Sachen daheim via Subdomain erreichbar.

    hab das script grad gefunden, hab noch nen webhost mini von blackfriday 2017 - bins mir grad am einrichten :)

    wegen dem Magenta zuhause L - dort gibts keine dedizierte ip und der voice / data S premium mit 250mbits als privatkunde sind 77 euro zuviel des guten haha :D

    geekmonkey der webhost mini hat aber keinen cronjob, wie hast du bewerkstelligt dass der script auf dem webhost ausgeführt wird, wenn das webhostpaket kein cronjob inne hat?:/

    das beantwortet meine frage leider nicht ganz.

    ich möchte aus der ferne und im allgemeinen bei mir zuhause ne domain als bsp hosten.

    auch mit mailverkehr, daher brauch ich den rdns.

    der vpn client läuft dann auf dem router zuhause direkt , nicht auf den jeweiligen Geräten.

    Ich will das mein lokaler pi4 zb über domain owncloud.maxmustermann.de erreichbar ist, mein ts unter ts.maxmustermann.de meine website unter mustermann.de usw usw.

    wenn ich jetzt nen openvpn auf nem debian einrichte den client auf meinem router laufen lasse dafür so dass alle geräte im lokalen netz über den vpn ins netz gehen (tolle sache dieser ac 86u :D ) kann ich dann ganz schlicht meine domain auf die ip vom vps zeigen lassen und die portverwaltung läuft über mein heimnetz

    oder muss ich die ports einzeln routen lassen - denke mal das alle ports auf dem vps offen lassen nicht so ne dolle idee wäre , auch wenn dort eige nur nen vpn server laufen soll.


    Quasi:

    Ich zuhause->VPN->VPS(bei netzcup)->ins weite internet

    Weite internet->VPS bei netcup>VPN>ich zuhause.

    möchte eige nix mehr als die IP des VPS fest bm zuhause nutzen zu können^^

    Hey zusammen,

    mal ne ganz banale frage.

    Habe zuhause eine Supervectoring 250Mbits(down)42(UP) Leitung. beim großen T.

    Würde einige Sachen gerne Zuhause betreiben auf nem raspberry pi 4 (kleine ws, klitzekleine owncloud usw.)

    Möchte aber nicht auf dyndns zurückgreifen (mag nicht auf nen xyz unternehmen im Internet angewiesen sein) - sondern möchte vollwertig IPV4 nutzen können.

    Da mein Anbieter nur business kunden eine feste ipv4 zu HORRENTEN!!! preisen zur verfügung stellt, war meine idee:

    Theoretisch könnte ich doch einen VPS nehmen (ganz kleinen, Traffic würde nicht mehr als 2-5 tb im Monat entstehen (durch private Nutzung :D ) dort einen vpn Server betreiben (unverschlüsselt - mit ner normalen festenip beim ISP wäre es ja auch nicht verschlüsselt (außer halt deinste smtp, https usw)

    So dass ich mit meinem Asus AC86U einen festen VPN Client zu meinem VPS einrichte der dann 24/7 läuft.

    Dadurch dürfte ich dann doch die feste ip des roots nutzen können? :)

    Wie schaut es dabei dann mit Ports etc aus.

    Würde ungern ports 1x im Router 1x aufm Server und 1 mal aufm Betriebssystem des homepcs freigeben müssen..

    würde es gerne so haben, als hätte ich einfach eine feste ip über den isp.. nur halt Umweg über den vps :)

    Absicherung des ganzen natürlich vorausgesetzt (ssh keys, sichere Passwörter, ggfls f2b als Ergänzung) den rootlogin würde ich extern eh verbieten wollen, alles was ich einstellen würde könnte! ich auch übers Netcup VNC machen :)

    Wäre das ganze theoretisch umsetzbar?

    Möchte mich ungern (erneut) an einen RS XXXX binden wenn ich alles notwendige bis auf die feste ip schon zuhause hätte :)

    lg und sry für die Rechtschreibung (Smartphone beim laufen getippt)

    wenn mans so rechnet hast du recht x)

    der vertrag wechselt komplett auf deinen namen und etwaiges bereits vorhandenes kundenkonto.

    es ist so, als hättest du selbst damals den vertrag geschlossen. entsprechend auch mit vlan dann wenn dus verknüpfst

    ähm wie sieht so ne übernahme aus?

    man kann den für 25,-? in ein anderes konto umziehen

    und ja ich überleg gerade noch, wäre noch gut zu wissen MLZ, und Abrechnungszeitraum oder hab ich das überlesen

    Bin da echt noch am überlegen jedoch zeige mal Interresse daran.

    habs bisjen ausführlicher erläutert =) ist quasi ende februar noch für den server halbes jahr zu zahlen und für plesk wie beschrieben.

    du kriegst quasi gute 3 monate von mir bezahlt geschenkt und bist auch dann anschließend theoretisch nen halbes jahr noch gebunden. (statt wenn du frisch machst 1 jahr).

    In diesem Falle sind dann noch 9 Monate offen nicht wahr?

    ist also noch quasi nen halbes jahr zu zahlen statt 1 jahr, da das erste halbe jahr ich bezahlt hab. lediglich bei plesk wird in 3 monaten immer abgezogen, da wären es quasi 9 monate.

    btw, falls du relativ wenig erfahrung hast, kann ich dir plesk echt ans herz legen.

    gute community, mit docker (für deine gameserver uA) echt easy zu bedienen.

    vorallem fürs hosten von mehreren websiten :)

    kann dir anschließend auch gerne bei der einrichtung von allem helfen (firewall, fail2ban, ssh keys, docker usw)

    nein das erste halbe jahr ist bezahlt

    Produkt erstellt am: 26.09.2019

    abrechnungsperiode ist 6 monate

    [ROOT]

    Kosten / Monat (individuell vereinbart): 20,99 € (enthält MwSt. aus DE wenn erforderlich) Kosten / Monat (regulär): 20,99 € (inkl. in DE geltender MwSt.) Mindestvertragslaufzeit: 12 Monate Abrechnungsperiode: alle 6 Monate im voraus Kosten / Laufzeit (regulär): 251,88 € (inkl. in DE geltender MwSt.) Produkt erstellt am: 26.09.2019 Kündigungsfrist: mindestens 31 Tage vor Ablauf der Mindestvertragslaufzeit Möglicher Kündigungstermin:

    (Wenn Kündigung heute zugestellt wird.)

    dh bis zum 26.3.2020 ist alles bezahlt, dann wird noch 1x abgebucht für die restlichen 6 monate.

    selbiges bei plesk dort wird alle 3 monate für 13€ rund abgebucht.

    [plesk]

    Kosten / Monat (individuell vereinbart): 13,91 € (enthält MwSt. aus DE wenn erforderlich) Kosten / Monat (regulär): 13,91 € (inkl. in DE geltender MwSt.) Mindestvertragslaufzeit: 12 Monate Abrechnungsperiode: alle 3 Monate im voraus Kosten / Laufzeit (regulär): 166,92 € (inkl. in DE geltender MwSt.) Produkt erstellt am: 05.08.2019 Kündigungsfrist: mindestens 31 Tage vor Ablauf der Mindestvertragslaufzeit Möglicher Kündigungstermin:

    (Wenn Kündigung heute zugestellt wird.)

    schau dir mal meinen beitrag an, hab nen rs RS 4000 SSDx4 G8SE mit PLESK abzugeben (3 monate bereits bezahlt 1x abrechnungsperiode steht ende feb noch an) =)500gb ssd 6 cores dediziert für 20euro server + 13 plesk mtl (wiegesagt, gute 3 monate noch bezahlt)