AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / user-1059380

Thystra's questions

Martin Hope
Thystra
Asked: 2024-10-07 14:24:58 +0800 CST

Acessando a internet do Strongswan / IKE2 VPN com nftables

  • 5

Tenho um servidor Ubuntu 24.04.1 LTS executando o Strongswan.

Desde então, descobri que ele está usando o nftables e não o iptables como firewall.

Ao configurar a VPN, consigo me conectar ao cliente, mas não consigo acessar hosts na Internet por endereço IP ou resolver nomes.

Acho que estou esquecendo algumas regras de encaminhamento, mas não tenho certeza de como traduzi-las/aplicá-las em um formato NFT.

Que regra(s) preciso aplicar para que o IPV4 e o IPV6 funcionem para os clientes?

A configuração abaixo começou com um guia wireguard e eu o modifiquei para incluir outros serviços que tenho na máquina. Encontrei algumas referências do openwrt e strongswan e tentei traduzir isso, mas acho que ainda não atingi o objetivo. Agradeço qualquer conselho.

Obrigado.

Adicionei-os numa tentativa de passar o tráfego ipsec

pré-roteamento de cadeia

 meta ipsec exists ip saddr $IKE_NETS counter accept

cadeia inbound_world


    meta l4proto ah accept
    meta l4proto esp accept

/etc/nftables.conf

#!/usr/sbin/nft -f

flush ruleset

define DEV_WG = wg0
define DEV_OVPN = tun0
define DEV_VPN = { $DEV_WG, $DEV_OVPN }
define DEV_WORLD = eth0
define IP_OVPN = 10.8.0.0/24
define IP_WORLD_V4 = public_v4_ip
define IP_WORLD_V6 = public_v6_ip
define PORT_IKE = { 500, 4500 }
define PORT_WG = 51820
define PORT_OVPN = 1194
define PORT_VPN = { $PORT_IKE, $PORT_WG, $PORT_OVPN  }
define DEV_LOCAL_NETS = { $DEV_VPN }
define DEV_OUT_NETS = { $DEV_WORLD }
#define IKE_NETS = { 172.16.252.0/24, fd5a:4c1f:8d73:f583::/64 } <- did not like the Ipv6 address
define IKE_NETS = { 172.16.252.0/24 }


# `inet` applies to both IPv4 and IPv6.
table inet global {
    map port_forwards_tcp_ipv4 {
        type ipv4_addr . inet_service : ipv4_addr . inet_service
        # lets forward port for our torrent. Our 12345 to 12345 on 172.16.0.2
        elements = { $IP_WORLD_V4 . 12345 : 172.16.0.2 . 12345 }
    }

    map port_forwards_tcp_ipv6 {
        type ipv6_addr . inet_service : ipv6_addr . inet_service
        # lets forward port for our torrent. Our 12345 to 12345 on fdf5:6028:947d:1234::2
        elements = { $IP_WORLD_V6 . 12345 : [fdf5:6028:947d:1234::2] . 12345}
    }

    map port_forwards_udp_ipv4 {
        type ipv4_addr . inet_service : ipv4_addr . inet_service
        # lets forward port for our torrent. Our 12345 to 12345 on 172.16.0.2
        elements = { $IP_WORLD_V4 . 12345 : 172.16.0.2 . 12345 }
    }

    map port_forwards_udp_ipv6 {
        type ipv6_addr . inet_service : ipv6_addr . inet_service
        # lets forward port for our torrent. Our 12345 to 12345 on fdf5:6028:947d:1234::2
        elements = { $IP_WORLD_V6 . 12345 : [fdf5:6028:947d:1234::2] . 12345}
    }

    chain inbound_world {
        # accepting ping (icmp-echo-request) for diagnostic purposes.
        # However, it also lets probes discover this host is alive.
        # This sample accepts them within a certain rate limit:
        #
        # icmp type echo-request limit rate 5/second accept

        # Allow IPv6 configuration packets
        icmpv6 type {nd-neighbor-solicit,nd-neighbor-advert,nd-router-solicit, 
             nd-router-advert,mld-listener-query,destination-unreachable,
             packet-too-big,time-exceeded,parameter-problem} accept

        # allow SSH
        tcp dport { 22 } accept

        # http, https
        tcp dport 80 accept
        tcp dport 443 accept

        # smtp, submission, smtps
        tcp dport 25 accept
        tcp dport 587 accept
        tcp dport 465 accept

        # pop3, pop3s
        tcp dport 110 accept
        tcp dport 995 accept

        # imap, imaps
        tcp dport 143 accept
        tcp dport 993 accept

       # allow VPN connection
    udp dport { $PORT_VPN } accept

    meta l4proto ah accept
    meta l4proto esp accept
    }

    chain inbound_vpn {
        # accepting ping (icmp-echo-request) for diagnostic purposes.
        icmp type echo-request limit rate 5/second accept

        # Allow IPv6 configuration packets
        icmpv6 type {nd-neighbor-solicit,nd-neighbor-advert,nd-router-solicit,
             nd-router-advert,mld-listener-query,destination-unreachable,
             packet-too-big,time-exceeded,parameter-problem} accept

        # allow DNS and SSH from the private network
        tcp dport { 22, 53 } accept
        udp dport { 53 } accept
    }

    chain inbound {
        # drop all traffic by default
        type filter hook input priority filter; policy drop;

        # Allow traffic from established and related packets, drop invalid
        ct state vmap { established : accept, related : accept, invalid : drop }
        # Allow dnat (port forwarding)
        ct status dnat accept

        # allow loopback traffic, anything else jump to chain for further evaluation
        iifname vmap { lo : accept, $DEV_WORLD : jump inbound_world, $DEV_VPN : jump inbound_vpn}

        # the rest is dropped by the above policy
    }

    chain forward {
        type filter hook forward priority filter; policy drop;

        # Allow traffic from established and related packets, drop invalid
        ct state vmap { established : accept, related : accept, invalid : drop }
        # Allow port forwarding
        ct status dnat accept

        # connections from the internal nets to the out nets are allowed
        iifname $DEV_LOCAL_NETS oifname $DEV_OUT_NETS accept
        # the rest is dropped by the above policy
        meta ipsec exists ip saddr $IKE_NETS counter accept


    }

    chain prerouting {
       type nat hook prerouting priority dstnat; policy accept;
       dnat ip addr . port to ip daddr . tcp dport map @port_forwards_tcp_ipv4
       dnat ip6 addr . port to ip6 daddr . tcp dport map @port_forwards_tcp_ipv6
       dnat ip addr . port to ip daddr . udp dport map @port_forwards_udp_ipv4
       dnat ip6 addr . port to ip6 daddr . udp dport map @port_forwards_udp_ipv6
       meta ipsec exists ip saddr $IKE_NETS counter accept
    }

    chain postrouting {
        type nat hook postrouting priority srcnat; policy accept;
        # Hide IPs from local nets to the internet.
        # We are using SNAT because we have static IP and it wil work faster than MASQUERADE
        iifname $DEV_LOCAL_NETS oifname $DEV_WORLD snat ip to $IP_WORLD_V4
        iifname $DEV_LOCAL_NETS oifname $DEV_WORLD snat ip6 to $IP_WORLD_V6
    }
}

Piscinas Strongswan:

pools {
    primary-pool-ipv4 {
        addrs = 172.16.252.0/24
        dns = 172.16.252.1, 8.8.8.8, 9.9.9.9
        split_exclude = 172.16.0.0/12
    }
    primary-pool-ipv6 {
        addrs = fd5a:4c1f:8d73:f583::/64
    dns = 2620:fe::fe, 2620:fe::9

    }
ubuntu
  • 1 respostas
  • 24 Views
Martin Hope
Thystra
Asked: 2024-09-03 09:40:29 +0800 CST

Não é possível conectar ao servidor Strongswan VPN

  • 6

Estou tentando me conectar ao meu servidor Strongswan VPN, compilado a partir da versão 5.9.14.

Eu o tenho no servidor, e o cliente tenta se conectar, mas o servidor nunca atende a chamada. Eu verifiquei o firewall e ele está configurado para permitir as portas 500 e 4500. Eu também tentei fazer com que ele efetue login com mais detalhes, mas ele não faz isso / ou nenhuma entrada é feita no diário do sistema.

Geralmente, estou perdido e apreciaria qualquer ajuda. Eu tentei com UFW para cima e para baixo - nenhuma mudança.

O servidor é um Ubuntu 24.04.01 LTS.

Comando de compilação:

 ./configure --prefix=/usr --sysconfdir=/etc --disable-defaults --enable-silent-rules      --enable-charon --enable-systemd --enable-ikev2 --enable-vici --enable-swanctl        --enable-nonce --enable-random --enable-drbg --enable-openssl --enable-curl           --enable-pem --enable-x509 --enable-constraints --enable-revocation --enable-pki      --enable-pubkey --enable-socket-default --enable-kernel-netlink --enable-resolve      --enable-eap-identity --enable-eap-md5 --enable-eap-dynamic --enable-eap-tls          --enable-updown --enable-tss-tss2 --enable-tpm
root@huginn:~/strongswan-5.9.14# service strongswan status
● strongswan.service - strongSwan IPsec IKEv1/IKEv2 daemon using swanctl
     Loaded: loaded (/usr/lib/systemd/system/strongswan.service; enabled; preset: enabled)
     Active: active (running) since Mon 2024-09-02 21:06:16 EDT; 10min ago
    Process: 220846 ExecStartPost=/usr/sbin/swanctl --load-all --noprompt (code=exited, status=0/SUCCESS)
   Main PID: 220827 (charon-systemd)
     Status: "charon-systemd running, strongSwan 5.9.14, Linux 6.8.0-41-generic, x86_64"
      Tasks: 17 (limit: 9445)
     Memory: 3.5M (peak: 6.1M)
        CPU: 44ms
     CGroup: /system.slice/strongswan.service
             └─220827 /usr/sbin/charon-systemd

Sep 02 21:06:16 huginn swanctl[220846]: loaded certificate from '/etc/swanctl/x509ca/ca-chain.cert.pem'
Sep 02 21:06:16 huginn swanctl[220846]: loaded private key from '/etc/swanctl/private/vpn.server.org.key.pem'
Sep 02 21:06:16 huginn swanctl[220846]: loaded eap secret 'eap-user'
Sep 02 21:06:16 huginn swanctl[220846]: loaded authority 'Strongswan'
Sep 02 21:06:16 huginn swanctl[220846]: successfully loaded 1 authorities, 0 unloaded
Sep 02 21:06:16 huginn swanctl[220846]: loaded pool 'remote_pool'
Sep 02 21:06:16 huginn swanctl[220846]: successfully loaded 1 pools, 0 unloaded
Sep 02 21:06:16 huginn swanctl[220846]: loaded connection 'roadwarrior'
Sep 02 21:06:16 huginn swanctl[220846]: successfully loaded 1 connections, 0 unloaded
Sep 02 21:06:16 huginn systemd[1]: Started strongswan.service - strongSwan IPsec IKEv1/IKEv2 daemon using swanctl.

registro.conf

charon-systemd {
  journal {
    default = 4
    ike = 4
    knl = 4
    # ...
  }
}

charon {

  # two defined file loggers
  filelog {
    charon {
      # path to the log file, specify this as section name in versions prior to 5.7.0
      path = /var/log/charon.log
      # add a timestamp prefix
      time_format = %b %e %T
      # prepend connection name, simplifies grepping
      ike_name = yes
      # overwrite existing files
      append = yes
      # increase default loglevel for all daemon subsystems
      default = 2
      # flush each line to disk
      flush_line = yes
    }
    stderr {
      # more detailed loglevel for a specific subsystem, overriding the
      # default loglevel.
      ike = 2
      knl = 3
    }
  }

  # and two loggers using syslog
  syslog {
    # prefix for each log message
    identifier = charon-custom
    # use default settings to log to the LOG_DAEMON facility
    daemon {
    }
    # very minimalistic IKE auditing logs to LOG_AUTHPRIV
    auth {
      default = -1
      ike = 0
    }
  }
 # ...
}

conexão.conf

#roadwarrior configuration
authorities {
     Strongswan {
          cacert = ca-chain.cert.pem
     }
}    

  journal {
    default = 4  
    ike = 4
    knl = 4
    # ...
  }


  connections {
    roadwarrior {
      pools = rw_pool
      local {
        auth = pubkey
          certs = vpn.server.org.cert.pem
          id = vpn.server.org
        }
      remote {
        auth = pubkey
      }
      children {
        roadwarrior {
#          local_ts  = 10.1.0.0/16
#          local_ts = 0.0.0.0/0
           local_ts = 0.0.0.0/0, ::/0
           rekey_time = 0
        }
      }
    }
  }


  }

log do cliente (ubuntu desktop 24.04)

2024-09-02T19:32:04.323589-06:00 fafnir charon-nm: 05[ENC] generating IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) N(FRAG_SUP) N(HASH_ALG) N(REDIR_SUP) ]
2024-09-02T19:32:04.323634-06:00 fafnir charon-nm: 05[NET] sending packet: from 192.168.30.50[46858] to 167.71.166.210[500] (972 bytes)
2024-09-02T19:32:08.324281-06:00 fafnir charon-nm: 12[IKE] retransmit 1 of request with message ID 0
2024-09-02T19:32:08.324342-06:00 fafnir charon-nm: 12[NET] sending packet: from 192.168.30.50[46858] to <server ip>[500] (972 bytes)
2024-09-02T19:32:15.524583-06:00 fafnir charon-nm: 14[IKE] retransmit 2 of request with message ID 0
2024-09-02T19:32:15.524692-06:00 fafnir charon-nm: 14[NET] sending packet: from 192.168.30.50[46858] to <server ip>[500] (972 bytes)
2024-09-02T19:32:28.485020-06:00 fafnir charon-nm: 09[IKE] retransmit 3 of request with message ID 0
2024-09-02T19:32:28.485079-06:00 fafnir charon-nm: 09[NET] sending packet: from 192.168.30.50[46858] to <server ip>[500] (972 bytes)
2024-09-02T19:32:51.813298-06:00 fafnir charon-nm: 15[IKE] retransmit 4 of request with message ID 0
2024-09-02T19:32:51.813448-06:00 fafnir charon-nm: 15[NET] sending packet: from 192.168.30.50[46858] to <server ip>[500] (972 bytes)
2024-09-02T19:33:04.247159-06:00 fafnir charon-nm[70214]: Connect timer expired, disconnecting.
2024-09-02T19:33:04.247220-06:00 fafnir charon-nm: 08[IKE] destroying IKE_SA in state CONNECTING without notification
2024-09-02T19:33:04.247899-06:00 fafnir charon-nm: 07[KNL] interface nm-xfrm-2751540 deactivated
2024-09-02T19:33:04.248785-06:00 fafnir charon-nm: 13[KNL] fe80::bddd:f33c:78f:5cd9 disappeared from nm-xfrm-2751540

Atualização de 4 de setembro.

Meu cliente está se conectando via Starlink, que eu entendo que teve problemas com IPV4, então eu o reconfigurei para IPv6 com base na configuração do Strongswan Test labs para IPv6 roadwarrior. Então eu executei um TCPDUMP enquanto tentava conectar, o que, do servidor, resultou nisso:

02:42:11.805109 IP6 (flowlabel 0x064f8, hlim 53, next-header UDP (17) payload length: 248) client-ipv6-address.55059 > server-ipv6-address.500: [udp sum ok] isakmp 2.0 msgid 00000000: parent_sa ikev2_init[I]:
    (sa: len=44
        (p: #1 protoid=isakmp transform=4 len=44
            (t: #1 type=encr id=aes (type=keylen value=0080))
            (t: #2 type=integ id=#12 )
            (t: #3 type=prf id=#5 )
            (t: #4 type=dh id=#31 )))
    (v2ke: len=32 group=#31)
    (nonce: len=32 data=(37b6ff2309f8d07e5532...0000402f00020003000400050000000800004016))
    (n: prot_id=#0 type=16388(nat_detection_source_ip))
    (n: prot_id=#0 type=16389(nat_detection_destination_ip))
    (n: prot_id=#0 type=16430(status))
    (n: prot_id=#0 type=16431(status))
    (n: prot_id=#0 type=16406(status))
02:42:15.803606 IP6 (flowlabel 0x064f8, hlim 53, next-header UDP (17) payload length: 248) client-ipv6-address.55059 > server-ipv6-address.500: [udp sum ok] isakmp 2.0 msgid 00000000: parent_sa ikev2_init[I]:
    (sa: len=44
        (p: #1 protoid=isakmp transform=4 len=44
            (t: #1 type=encr id=aes (type=keylen value=0080))
            (t: #2 type=integ id=#12 )
            (t: #3 type=prf id=#5 )
            (t: #4 type=dh id=#31 )))
    (v2ke: len=32 group=#31)
    (nonce: len=32 data=(37b6ff2309f8d07e5532...0000402f00020003000400050000000800004016))
    (n: prot_id=#0 type=16388(nat_detection_source_ip))
    (n: prot_id=#0 type=16389(nat_detection_destination_ip))
    (n: prot_id=#0 type=16430(status))
    (n: prot_id=#0 type=16431(status))
    (n: prot_id=#0 type=16406(status))
02:42:23.008293 IP6 (flowlabel 0x064f8, hlim 53, next-header UDP (17) payload length: 248) client-ipv6-address.55059 > server-ipv6-address.500: [udp sum ok] isakmp 2.0 msgid 00000000: parent_sa ikev2_init[I]:
    (sa: len=44
        (p: #1 protoid=isakmp transform=4 len=44
            (t: #1 type=encr id=aes (type=keylen value=0080))
            (t: #2 type=integ id=#12 )
            (t: #3 type=prf id=#5 )
            (t: #4 type=dh id=#31 )))
    (v2ke: len=32 group=#31)
    (nonce: len=32 data=(37b6ff2309f8d07e5532...0000402f00020003000400050000000800004016))
    (n: prot_id=#0 type=16388(nat_detection_source_ip))
    (n: prot_id=#0 type=16389(nat_detection_destination_ip))
    (n: prot_id=#0 type=16430(status))
    (n: prot_id=#0 type=16431(status))
    (n: prot_id=#0 type=16406(status))
02:42:35.966303 IP6 (flowlabel 0x064f8, hlim 53, next-header UDP (17) payload length: 248) client-ipv6-address.55059 > server-ipv6-address.500: [udp sum ok] isakmp 2.0 msgid 00000000: parent_sa ikev2_init[I]:
    (sa: len=44
        (p: #1 protoid=isakmp transform=4 len=44
            (t: #1 type=encr id=aes (type=keylen value=0080))
            (t: #2 type=integ id=#12 )
            (t: #3 type=prf id=#5 )
            (t: #4 type=dh id=#31 )))
    (v2ke: len=32 group=#31)
    (nonce: len=32 data=(37b6ff2309f8d07e5532...0000402f00020003000400050000000800004016))
    (n: prot_id=#0 type=16388(nat_detection_source_ip))
    (n: prot_id=#0 type=16389(nat_detection_destination_ip))
    (n: prot_id=#0 type=16430(status))
    (n: prot_id=#0 type=16431(status))
    (n: prot_id=#0 type=16406(status))
02:42:59.299393 IP6 (flowlabel 0x064f8, hlim 53, next-header UDP (17) payload length: 248) client-ipv6-address.55059 > server-ipv6-address.500: [udp sum ok] isakmp 2.0 msgid 00000000: parent_sa ikev2_init[I]:
    (sa: len=44
        (p: #1 protoid=isakmp transform=4 len=44
            (t: #1 type=encr id=aes (type=keylen value=0080))
            (t: #2 type=integ id=#12 )
            (t: #3 type=prf id=#5 )
            (t: #4 type=dh id=#31 )))
    (v2ke: len=32 group=#31)
    (nonce: len=32 data=(37b6ff2309f8d07e5532...0000402f00020003000400050000000800004016))
    (n: prot_id=#0 type=16388(nat_detection_source_ip))
    (n: prot_id=#0 type=16389(nat_detection_destination_ip))
    (n: prot_id=#0 type=16430(status))
    (n: prot_id=#0 type=16431

Não recebo nada no syslog para o IP do cliente ou para conexões IKEV2.

Atualização de 4 de setembro - saída ps -ef

UID          PID    PPID  C STIME TTY          TIME CMD
root        1020       1  0 03:03 ?        00:00:00 /usr/sbin/charon-systemd

ubuntu
  • 1 respostas
  • 120 Views
Martin Hope
Thystra
Asked: 2023-11-05 23:01:05 +0800 CST

Criando regex para Fail2ban e NGINX

  • 4

Estou tendo problemas para entender como criar um regex para capturar tentativas de investigação em meu servidor nginx.

Eu gostaria de criar um filtro para capturar sites que acessam determinados arquivos (por nome) e/ou por erro de php.

Meu exemplo de arquivo de log está abaixo:

2023/11/04 14:40:26 [error] 1341#1341: *46805 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 194.113.235.169, server: www.server.org, request: "GET /index2.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9999", host: "www.server.org", referrer: "https://www.server.org/index2.php"

Eu estava brincando com um construtor de regex e descobri a string abaixo:

\bPrimary|\bscript|\bunknown

O que corresponderia à frase.

Como faço para construir isso em um filtro fail2ban?

O Logwatch também me envia um bom resumo dos erros, que eu gostaria de poder começar a adicionar seletivamente aos filtros.

Requests with error response codes
    400 Bad Request
       null: 60 Time(s)
       \xC0/\xC00\xC0+\xC0,\xCC\xA8\xCC\xA9\xC0\x ... x09\xC0\x14\xC0: 11 Time(s)
       *: 7 Time(s)
       /: 6 Time(s)
       google.com:443: 2 Time(s)
       $\x11\xA2\x8D*^\xB5\xBB\x1D: 1 Time(s)
       )Dxx\x1D'\xB7\x00\x00: 1 Time(s)
       ,c(\x0B\xF1: 1 Time(s)
       /.env: 1 Time(s)
       /api/v4/cloud/subscription/self-serve-status: 1 Time(s)
       /basic_status: 1 Time(s)
       /manager/html: 1 Time(s)
       /manager/text/list: 1 Time(s)
       /nginx_status: 1 Time(s)
       /nginx_stub: 1 Time(s)
       /private/api/v1/service/premaster: 1 Time(s)
       /status: 1 Time(s)
       /stub_status: 1 Time(s)
       4\xE8%\x98w4\x0Bcry\xAA%\x82r\x0B&\x8B\x9D: 1 Time(s)
       LM: 1 Time(s)
       \x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x ... x00\x00\x00\x00: 1 Time(s)
       \x11\x97e\xDC\x0CD\xBA\xDFS\x00\x00*\xC0+\ ... xA8\xCC\xAA\xC0: 1 Time(s)
       \xC0((+\x9B<8\xFA: 1 Time(s)
       `\x0B!\xCE,\xD5}L7/nh&\x08+\xAB\xCA: 1 Time(s)
       mstshash=Administr: 1 Time(s)
404 Not Found
       /wp-content/plugins/WordPressCore/include.php: 7 Time(s)
       /wp-content/plugins/core-plugin/include.php: 4 Time(s)
       /wp-content/plugins/include.php: 4 Time(s)
       /wp-content/themes/include.php: 4 Time(s)
       /wp-includes/images/include.php: 4 Time(s)
       /wp-includes/widgets/include.php: 4 Time(s)
       /%25: 3 Time(s)
       //wp-content/plugins/seoplugins/mar.php: 3 Time(s)
       //wp-content/themes/seotheme/db.php?u: 3 Time(s)
       //wp-content/themes/seotheme/mar.php: 3 Time(s)
       /?author=2: 3 Time(s)
       /admin/plugins/plupload/examples/upload.php: 3 Time(s)
       /api/v4/emoji/name/%F0%9F%98%86: 3 Time(s)
       /wp-content/themes/sketch/404.php: 3 Time(s)
       /wp-login.php: 3 Time(s)
       /.index.php: 2 Time(s)
       /99vt: 2 Time(s)
       /Res/login.html: 2 Time(s)
       /aaaaaaaaaaaaaaaaaaaaaaaaaqr: 2 Time(s)
       /actuator/gateway/routes: 2 Time(s)
       /backup/: 2 Time(s)
       /blog/: 2 Time(s)
       /new/: 2 Time(s)
       /old/: 2 Time(s)
       /owa/auth/x.js: 2 Time(s)
       /sitemap: 2 Time(s)
       /sitemap.txt: 2 Time(s)
       /sitemap.xml: 2 Time(s)
       /style.php?sig=update&domain=51.79.124.111: 2 Time(s)
       /temp/: 2 Time(s)
       /test/: 2 Time(s)
       /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php: 2 Time(s)
       /webui/: 2 Time(s)
       /wordpress/: 2 Time(s)
       /wp-content/plugins/drag-and-drop-multiple ... -upload-cf7.css: 2 Time(s)
       /wp-content/plugins/wp-meta-and-date-remov ... js/inspector.js: 2 Time(s)
       /wp-content/themes/seotheme/db.php?u: 2 Time(s)
       /wp/: 2 Time(s)
       /.git/config: 1 Time(s)
       /.well-known/: 1 Time(s)
       /.well-knownold/: 1 Time(s)
       //wp-content/plugins/WordPressCore/include.php: 1 Time(s)
       //wp-content/plugins/fix/up.php: 1 Time(s)
       /99vu: 1 Time(s)
       /?author=3: 1 Time(s)
       /?author=4: 1 Time(s)
       /ACio: 1 Time(s)
       /KjDKeIsQhh.php: 1 Time(s)
       /Login.jsp: 1 Time(s)
       /Telerik.Web.UI.WebResource.axd?type=rau: 1 Time(s)
       /ab2g: 1 Time(s)
       /ab2h: 1 Time(s)
       /actuator/health: 1 Time(s)
       /admin/: 1 Time(s)
       /admin/ckeditor/kcfinder/upload.php: 1 Time(s)
       /admin/events/lib/external/responsive_file ... ager/dialog.php: 1 Time(s)
       /admin/filemanager/dialog.php: 1 Time(s)
       /admin/js/kcfinder/upload.php: 1 Time(s)
       /admin/responsive_filemanager/filemanager/dialog.php: 1 Time(s)
       /ads.txt: 1 Time(s)
       /api/session/properties: 1 Time(s)
       /app/rest/users/id:1/tokens/RPC2: 1 Time(s)
       /assets/elfinder/elfinder.html: 1 Time(s)
       /assets/filemanager/dialog.php: 1 Time(s)
       /assets/js/kcfinder/upload.php: 1 Time(s)
       /assets/plugins/elfinder/elfinder.html: 1 Time(s)
       /assets/plugins/kcfinder/upload.php: 1 Time(s)
       /assets/responsive_filemanager/filemanager/dialog.php: 1 Time(s)
       /assets/scripts/filemanager/dialog.php: 1 Time(s)
       /autodiscover/autodiscover.json?@zdi/Powershell: 1 Time(s)
       /autodiscover/autodiscover.json?a..foo.var ... ol=%50owershell: 1 Time(s)
       /backup: 1 Time(s)
       /basic_status: 1 Time(s)
       /bc: 1 Time(s)
       /bk: 1 Time(s)
       /cf_scripts/scripts/ajax/ckeditor/ckeditor.js: 1 Time(s)
       /cgi-bin/authLogin.cgi: 1 Time(s)
       /cgi-bin/config.exp: 1 Time(s)
       /cgi-bin/vitogate.cgi: 1 Time(s)
       /cm3Z: 1 Time(s)
       /cms/tinymce/filemanager/filemanager/dialog.php: 1 Time(s)
       /cms/vendor/responsive_filemanager/filemanager/dialog.php: 1 Time(s)
       /config.json: 1 Time(s)
       /dview8/api/usersByLevel: 1 Time(s)
       /editor/filemanager/dialog.php: 1 Time(s)
       /favicon-32x32.png: 1 Time(s)
       /file-manager/: 1 Time(s)
       /file-manager/backend/makefile: 1 Time(s)
       /file-manager/backend/permissions: 1 Time(s)
       /file-manager/backend/text: 1 Time(s)
       /geoserver/web/: 1 Time(s)
       /graph_view.php?action=tree_content&node=1 ... %2810%29%3B--+-: 1 Time(s)
       /hejwjpam.php?Fox=d3wL7: 1 Time(s)
       /home: 1 Time(s)
       /humans.txt: 1 Time(s)
       /index.php: 1 Time(s)
       /index2.php: 1 Time(s)
       /info.php: 1 Time(s)
       /js/fileManager/filemanager/dialog.php: 1 Time(s)
       /js/kcfinder/upload.php: 1 Time(s)
       /js/tinymce4/plugins/filemanager/dialog.php: 1 Time(s)
       /lib/filemanager/dialog.php: 1 Time(s)
       /main: 1 Time(s)
       /media/filemanager/dialog.php: 1 Time(s)
       /new: 1 Time(s)
       /nginx_status: 1 Time(s)
       /nginx_stub: 1 Time(s)
       /old: 1 Time(s)
       /owa/: 1 Time(s)
       /owa/auth.owa: 1 Time(s)
       /plugins/content/apismtp/apismtp.php?test=hello: 1 Time(s)
       /plugins/kcfinder/upload.php: 1 Time(s)
       /plugins/responsive_filemanager/filemanager/dialog.php: 1 Time(s)
       /po-admin/filemanager/dialog.php: 1 Time(s)
       /po-content/filemanager/dialog.php: 1 Time(s)
       /public/filemanager/dialog.php: 1 Time(s)
       /public/js/libraries/filemanager/dialog.php: 1 Time(s)
       /public/scripts/filemanager/dialog.php: 1 Time(s)
       /remote/login: 1 Time(s)
       /resources/plugins/tiny_mce/plugins/filemanager/dialog.php: 1 Time(s)
       /responsive_filemanager/filemanager/dialog.php: 1 Time(s)
       /server-status: 1 Time(s)
       /showLogin.cc: 1 Time(s)
       /solr/: 1 Time(s)
       /static/historypage.js: 1 Time(s)
       /sugar_version.json: 1 Time(s)
       /t4: 1 Time(s)
       /telescope/requests: 1 Time(s)
       /tinymce/filemanager/dialog.php: 1 Time(s)
       /tutor/filter?searched_word&searched_tutio ... ed_duration[]=0: 1 Time(s)
       /vendor/phpunit/phpunit/phpunit.xml: 1 Time(s)
       /version: 1 Time(s)
       /webfig/: 1 Time(s)
       /wordpress: 1 Time(s)
       /wp: 1 Time(s)
       /wp-admin/: 1 Time(s)
       /wp-admin/css/colors/blue/blue.php?wall=ZW ... EJvdCI7Pz4nKTs=: 1 Time(s)
       /wp-config._1: 1 Time(s)
       /wp-config._2: 1 Time(s)
       /wp-config._backup: 1 Time(s)
       /wp-config.back: 1 Time(s)
       /wp-config.php__: 1 Time(s)
       /wp-config.php______: 1 Time(s)
       /wp-config.php__olds: 1 Time(s)
       /wp-config.php_backup: 1 Time(s)
       /wp-config.php_old2003: 1 Time(s)
       /wp-config.php_old2004: 1 Time(s)
       /wp-config.php_old2005: 1 Time(s)
       /wp-config.php_old2007: 1 Time(s)
       /wp-config.php_old2009: 1 Time(s)
       /wp-config.php_old2010: 1 Time(s)
       /wp-config.php_old2011: 1 Time(s)
       /wp-config.php_old2016: 1 Time(s)
       /wp-config.php_old2018: 1 Time(s)
       /wp-config.php_old2019: 1 Time(s)
       /wp-config.php_old2020: 1 Time(s)
       /wp-config.php_old2022: 1 Time(s)
       /wp-config.php_old2023: 1 Time(s)
       /wp-config.php_original: 1 Time(s)
       /wp-config.phpc: 1 Time(s)
       /wp-config.phpd: 1 Time(s)
       /wp-config.phpn: 1 Time(s)
       /wp-config.phpnew: 1 Time(s)
       /wp-config.phpold: 1 Time(s)
       /wp-config.phps: 1 Time(s)
       /wp-config.php~1: 1 Time(s)
       /wp-config.php~bk: 1 Time(s)
       /wp-config.prod: 1 Time(s)
       /wp-config.prod.php.txt: 1 Time(s)
       /wp-config.production: 1 Time(s)
       /wp-config.rej: 1 Time(s)
       /wp-config.sav: 1 Time(s)
       /wp-config.save: 1 Time(s)
       /wp-config.save.1: 1 Time(s)
       /wp-config.save.2: 1 Time(s)
       /wp-config.stage: 1 Time(s)
       /wp-config.sublime-project: 1 Time(s)
       /wp-config.swn: 1 Time(s)
       /wp-config.swo: 1 Time(s)
       /wp-config.tar: 1 Time(s)
       /wp-config.temp: 1 Time(s)
       /wp-config.templ: 1 Time(s)
       /wp-config.tmp: 1 Time(s)
       /wp-config.uk: 1 Time(s)
       /wp-config.un~: 1 Time(s)
       /wp-config.us: 1 Time(s)
       /wp-config.vb: 1 Time(s)
       /wp-config.vbproj: 1 Time(s)
       /wp-config.wp-config.php.swo: 1 Time(s)
       /wp-config_good: 1 Time(s)
       /wp-content/: 1 Time(s)
       /wp-content/plugins/apikey/apikey.php?test=hello: 1 Time(s)
       /wp-content/plugins/media-library-assistan ... ite/patrowl.svg: 1 Time(s)
       /wp-content/plugins/media-library-assistant/readme.txt: 1 Time(s)
       /wp-content/plugins/wordpresscore/include.php: 1 Time(s)
       /wp-content/plugins/wp-stats-manager/includes/: 1 Time(s)
       /wp-content/plugins/wp-stats-manager/languages/: 1 Time(s)
       /wp-content/plugins/wp-stats-manager/notifications.php: 1 Time(s)
       /wp-content/themes/themify-ultra/style.css: 1 Time(s)
       /wp-content/themes/twentytwentythree/index.php: 1 Time(s)
       /wp-content/upgrade/: 1 Time(s)
       /wp-content/upgrade/upfile.php: 1 Time(s)
       /wp-content/uploads/: 1 Time(s)
       /wp-includes/: 1 Time(s)
       /wp-includes/autoload_classmap.php: 1 Time(s)
       /wp-json/wp/v2/users/2: 1 Time(s)
       /wp-json/wp/v2/users/4: 1 Time(s)
       /wp-json/wp/v2/users/5: 1 Time(s)
       /wp-plain.php: 1 Time(s)

exemplo de entrada de log para erro:

31.208.250.224 - - [04/Nov/2023:20:44:57 -0400] "GET /wp-config._backup HTTP/1.1" 404 5056 "https://www.server.blog//wp-config._backup" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0"

Para resumir:

  1. Gostaria de obter ajuda para criar um filtro que capture "script primário desconhecido"
  2. Gostaria de obter ajuda para fazer um filtro que capture os erros 404 investigando o servidor, começando com wp-config, e para adicionar/expandir a lista à medida que ela cresce (por exemplo, arquivos .env)
  3. Existe uma boa referência sobre como aprender a magia negra regex? Eu olhei em vários sites e não estou entendendo toda a magia.

Eu apreciaria qualquer ajuda sobre isso. Obrigado.

Link de depuração -https://www.debuggex.com/?re=%5CbPrimary%7C%5Cbscript%7C%5Cbunknown%7C+%5B%5B%5Dclient+%28%3F%3A%5C%5B%3F%28%3F%3A% 28%3F%3A%3A%3Af%7B4%2C6%7D%3A%29%3F%28%3FP%3Cip4%3E%28%3F%3A%5Cd%7B1%2C3%7D%5C.%29%7B3 %7D%5Cd%7B1%2C3%7D%29%7C%28%3FP%3Cip6%3E%28%3F%3A%5B0-9a-fA-F%5D%7B1%2C4%7D%3A%3A%3F %7C%3A%3A%29%7B1%2C7%7D%28%3F%3A%5B0-9a-fA-F%5D%7B1%2C4%7D%7C%28%3F%3C%3D%3A%29 %3A%29%29%29%5C%5D%3F%7C%28%3FP%3Cdns%3E%5B%5Cw%5C-.%5E_%5D%2A%5Cw%29%29%5B%5D%5D&str =2023%2F11%2F04+22%3A23%3A52+%5Berror%5D+1341%231341%3A+%2A58181+FastCGI+sent+in+stderr%3A+%22Primary+script+unknown%22+while+reading+response+header +from+upstream%2C+cliente%3A+94.156.69.32%2C+servidor%3A+www.wolfandraven.blog%2C+request%3A+%22GET+%2Fwp-content%2Fplugins%2Fcore-plugin%2Finclude.php+HTTP %2F1.1%22%2C+upstream%3A+%22fastcgi%3A%2F%2F127.0.0.1%3A9999%22%2C+host%3A+%22www.wolfandraven.blog%22&flavor=python

nginx
  • 1 respostas
  • 76 Views

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Você pode passar usuário/passar para autenticação básica HTTP em parâmetros de URL?

    • 5 respostas
  • Marko Smith

    Ping uma porta específica

    • 18 respostas
  • Marko Smith

    Verifique se a porta está aberta ou fechada em um servidor Linux?

    • 7 respostas
  • Marko Smith

    Como automatizar o login SSH com senha?

    • 10 respostas
  • Marko Smith

    Como posso dizer ao Git para Windows onde encontrar minha chave RSA privada?

    • 30 respostas
  • Marko Smith

    Qual é o nome de usuário/senha de superusuário padrão para postgres após uma nova instalação?

    • 5 respostas
  • Marko Smith

    Qual porta o SFTP usa?

    • 6 respostas
  • Marko Smith

    Linha de comando para listar usuários em um grupo do Windows Active Directory?

    • 9 respostas
  • Marko Smith

    O que é um arquivo Pem e como ele difere de outros formatos de arquivo de chave gerada pelo OpenSSL?

    • 3 respostas
  • Marko Smith

    Como determinar se uma variável bash está vazia?

    • 15 respostas
  • Martin Hope
    Davie Ping uma porta específica 2009-10-09 01:57:50 +0800 CST
  • Martin Hope
    kernel O scp pode copiar diretórios recursivamente? 2011-04-29 20:24:45 +0800 CST
  • Martin Hope
    Robert ssh retorna "Proprietário incorreto ou permissões em ~/.ssh/config" 2011-03-30 10:15:48 +0800 CST
  • Martin Hope
    Eonil Como automatizar o login SSH com senha? 2011-03-02 03:07:12 +0800 CST
  • Martin Hope
    gunwin Como lidar com um servidor comprometido? 2011-01-03 13:31:27 +0800 CST
  • Martin Hope
    Tom Feiner Como posso classificar a saída du -h por tamanho 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich O que é um arquivo Pem e como ele difere de outros formatos de arquivo de chave gerada pelo OpenSSL? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent Como determinar se uma variável bash está vazia? 2009-05-13 09:54:48 +0800 CST

Hot tag

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve