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-145652

Steffen's questions

Martin Hope
Steffen
Asked: 2022-03-06 10:54:50 +0800 CST

firewalld: registro de conexões de saída bloqueadas

  • 0

Eu configurei o firewalld para que o firewall bloqueie também as conexões de saída. O tráfego de saída que preciso tenho na lista branca adicionando regras específicas. Isso funciona bem.

Mas agora quero saber se existem conexões de saída que ainda estão bloqueadas pelo firewalld. Para verificar isso, configurei LogDeniede allreiniciei/recarreguei o firewalld. Agora eu posso ver muitas mensagens de firewalld /var/log/messagespara mensagens de REJECTentrada ed como

Mar  5 19:45:29 kvm011 kernel: FINAL_REJECT: IN=br0-enp3s0 OUT= MAC=80:ee:73:9d:59:09:98:9b:cb:bf:c3:7e:08:00 SRC=192.168.1.254 DST=192.168.1.3 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=55873 DF PROTO=TCP SPT=41047 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0 

Mas parece que o tráfego de saída bloqueado não será registrado. Eu testei: A porta SMTP 25 não está na lista branca para tráfego de saída. Então, se eu tentar enviar um e-mail, o e-mail é marcado como ''adiado'' e vejo no maillog que o e-mail não pode ser enviado:

Mar  5 19:46:21 kvm011 postfix/smtp[3240]: connect to xxx.xxx.org[193.111.xxx.xxx]:25: Connection timed out

Mas não há mensagem firewalld no /var/log/messagesarquivo (para a conexão bloqueada na porta 25). Devo ativar esse tipo de mensagem no firewalld? Se sim, como posso fazer isso?

logging centos7 firewalld
  • 1 respostas
  • 399 Views
Martin Hope
Steffen
Asked: 2021-12-30 07:44:34 +0800 CST

firewalld: bloquear conexões de saída bloqueia também conexões de entrada

  • 1

log4shell nos fez melhorar a segurança de alguns servidores. Queremos agora também bloquear o tráfego de saída (na medida do possível). As regras de firewall atuais são:

/> firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: eth0
  sources: 
  services: dhcpv6-client https smtp ssh
  ports: 143/tcp 3000/tcp 4949/tcp 8080/tcp 12999/tcp 25/tcp 1194/tcp
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 

Portanto, no exemplo, as conexões com o servidor via ssh são atualmente possíveis (e ainda devem ser possíveis no futuro). Agora queremos impedir todas as conexões de saída, exceto conexões por meio de https (443). Para fazer isso, adicionamos algumas regras de firewalld (consulte também https://serverfault.com/a/624474/145652 ):

/> firewall-cmd --permanent --direct --add-rule ipv4 filter OUTPUT 0 -p tcp -m tcp --dport=443 -j ACCEPT
success
/> firewall-cmd --permanent --direct --add-rule ipv4 filter OUTPUT 1 -j DROP
success
/> firewall-cmd --reload

Mas após esses comandos, perderemos todas as conexões com o servidor: sem ping, sem ssh, o servidor não aceita nenhuma conexão. É possível que firewall-cmd --permanent --direct --add-rule ipv4 filter OUTPUT 1 -j DROPesteja bloqueando todo o tráfego de saída, incluindo a resposta dos servidores de solicitações de entrada (ssh-)? Está faltando alguma regra para permitir o envio dos dados de resposta das solicitações recebidas?

rhel7
  • 0 respostas
  • 491 Views
Martin Hope
Steffen
Asked: 2019-04-01 21:20:36 +0800 CST

logrotate: O que significa a mensagem "log já foi girado"

  • 5

Se eu executar logrotate, recebo log does not need rotating (log has been already rotated)e o arquivo de log não é girado. Porquê isso?

Meu log gira conf:

/var/log/capp/*.log {
    missingok
    rotate 90
    daily
    notifempty
    compress
    delaycompress
}

Antes de executar logrotate eu removo a linha

"/var/log/capp/server.log" 2019-4-1-7:0:0

De arquivo/var/lib/logrotate/logrotate.status

saída logrotate:

/> logrotate -v /etc/logrotate.d/capp 
reading config file /etc/logrotate.d/capp
Allocating hash table for state file, size 15360 B

Handling 1 logs

rotating pattern: /var/log/capp/*.log  after 1 days (90 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/capp/server.log
  log does not need rotating (log has been already rotated)

e o arquivo de log não é girado:

/> ls -la  /var/log/capp/server.log*
-rw-r--r-- 1 capp capp 272962507  1. Apr 07:00 /var/log/capp/server.log
linux
  • 1 respostas
  • 5926 Views
Martin Hope
Steffen
Asked: 2018-12-06 00:47:50 +0800 CST

rkhunter: whitlist para teste 'packet_cap_apps'

  • 0

Temos aqui um servidor CentOS 7 com o rkhunter instalado. Desde ontem, recebemos o seguinte aviso do rkhunter:

[01:10:30] Info: Starting test name 'packet_cap_apps'
[01:10:30]   Checking for packet capturing applications      [ Warning ]
[01:10:30] Warning: Process '/usr/sbin/NetworkManager' (PID 4654) is listening on the network.

Existe uma maneira de whitelist /usr/sbin/NetworkManagerpara o packet_cap_appsteste?

linux
  • 2 respostas
  • 421 Views
Martin Hope
Steffen
Asked: 2017-08-02 00:26:39 +0800 CST

rkhunter: aviso de função de hash de pré-vinculação

  • 0

Estamos usando o rkhunter para verificar o nosso servidor periodicamente. O sistema operacional do servidor é CentOS 6/7. Mas desde a última atualização do rkhunter (atualmente a versão 1.4.4) estamos recebendo a seguinte mensagem de aviso:

[10:12:09] Performing file properties checks
[10:12:09] Warning: Checking for prerequisites               [ Warning ]
[10:12:09]          All file hash checks will be skipped because:
[10:12:09]              This system uses prelinking, but the hash function 
                        command does not look like SHA1 or MD5.

Mas tínhamos pré-vinculação com:

/> prelink -a --md5

Alguém sabe como posso evitar a mensagem ou o que pode estar errado?

linux
  • 2 respostas
  • 801 Views
Martin Hope
Steffen
Asked: 2016-06-04 07:38:27 +0800 CST

CentOS6.X: letsencrypt, cronjob e "versão pip" errada

  • 3

Estou tentando escrever um script que atualizará o certificado letsencrypt automaticamente via cronjob no CentOS6.x atualizado.

Para fazer isso, escrevi o seguinte script:

#!/bin/sh

#
# get newest "Let's Encrypt" version
#
cd /opt/letsencrypt
git pull

# bug fix #201600233: update pip
echo "****************************************************************"
echo pip --version
pip --version
echo "****************************************************************"

pip install --upgrade pip

#
# update certs
#

# stop httpd
/etc/init.d/httpd stop

# renew certs
/opt/letsencrypt/letsencrypt-auto renew > /var/log/letsencrypt/renew.log 2>&1
LE_STATUS=$?

# start httpd
/etc/init.d/httpd start

# check "Let's Encrypt" result
if [ "$LE_STATUS" != 0 ]; then
    echo Automated renewal failed:
    cat /var/log/letsencrypt/renew.log
    exit 1
fi

Toda vez que eu executar este script a partir da linha de comando, está tudo bem. O script está sendo executado sem erros. Mas toda vez que inicio o script via cronjob, recebo o erro

You are using pip version 8.0.3, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Não sei por que isso ocorre ... Há alguma variável de ambiente ausente?

Aqui toda a saída do cronjob. Observe também que a saída do cronjob diz que a versão do pip é "8.1.2".

Already up-to-date.
****************************************************************
pip --version
pip 8.1.2 from /usr/lib/python2.6/site-packages (python 2.6)
****************************************************************
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
Requirement already up-to-date: pip in /usr/lib/python2.6/site-packages
httpd beenden: [  OK  ]^M
httpd starten: [  OK  ]^M
Automated renewal failed:
Bootstrapping dependencies for RedHat-based OSes...
yum ist /usr/bin/yum
Geladene Plugins: fastestmirror, refresh-packagekit, security, verify
Einrichten des Installationsprozess
Loading mirror speeds from cached hostfile
 * base: centosmirror.netcup.net
 * epel: mirrors.n-ix.net
 * extras: centosmirror.netcup.net
 * updates: mirror.ratiokontakt.de
 * webtatic: uk.repo.webtatic.com
Paket gcc-4.4.7-17.el6.x86_64 ist bereits in der neusten Version installiert.
Paket dialog-1.1-9.20080819.1.el6.x86_64 ist bereits in der neusten Version installiert.
Paket augeas-libs-1.0.0-10.el6.x86_64 ist bereits in der neusten Version installiert.
Paket openssl-1.0.1e-48.el6_8.1.x86_64 ist bereits in der neusten Version installiert.
Paket openssl-devel-1.0.1e-48.el6_8.1.x86_64 ist bereits in der neusten Version installiert.
Paket libffi-devel-3.0.5-3.2.el6.x86_64 ist bereits in der neusten Version installiert.
Paket redhat-rpm-config-9.0.3-51.el6.centos.noarch ist bereits in der neusten Version installiert.
Paket ca-certificates-2015.2.6-65.0.1.el6_7.noarch ist bereits in der neusten Version installiert.
Paket python-2.6.6-64.el6.x86_64 ist bereits in der neusten Version installiert.
Paket python-devel-2.6.6-64.el6.x86_64 ist bereits in der neusten Version installiert.
Paket python-virtualenv-1.10.1-1.el6.noarch ist bereits in der neusten Version installiert.
Paket python-tools-2.6.6-64.el6.x86_64 ist bereits in der neusten Version installiert.
Paket python-pip-7.1.0-1.el6.noarch ist bereits in der neusten Version installiert.
Paket 1:mod_ssl-2.2.15-53.el6.centos.x86_64 ist bereits in der neusten Version installiert.
Nichts zu tun
Creating virtual environment...
Installing Python packages...
Had a problem while installing Python packages:
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
Requirement already satisfied (use --upgrade to upgrade): argparse==1.4.0 in /.local/share/letsencrypt/lib/python2.6/site-packages (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 5))
Collecting pycparser==2.14 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 11))
//.local/share/letsencrypt/lib64/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
//.local/share/letsencrypt/lib64/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading pycparser-2.14.tar.gz (223kB)
Collecting cffi==1.4.2 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 14))
  Downloading cffi-1.4.2.tar.gz (365kB)
Collecting ConfigArgParse==0.10.0 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 31))
  Downloading ConfigArgParse-0.10.0.tar.gz
Collecting configobj==5.0.6 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 33))
  Downloading configobj-5.0.6.tar.gz
Collecting cryptography==1.2.3 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 35))
  Downloading cryptography-1.2.3.tar.gz (373kB)
Collecting enum34==1.1.2 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 57))
  Downloading enum34-1.1.2.tar.gz (46kB)
Collecting funcsigs==0.4 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 60))
  Downloading funcsigs-0.4-py2.py3-none-any.whl
Collecting idna==2.0 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 63))
  Downloading idna-2.0-py2.py3-none-any.whl (61kB)
Collecting ipaddress==1.0.16 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 66))
  Downloading ipaddress-1.0.16.tar.gz
Collecting linecache2==1.0.0 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 69))
  Downloading linecache2-1.0.0-py2.py3-none-any.whl
Collecting ndg-httpsclient==0.4.0 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 72))
  Downloading ndg_httpsclient-0.4.0.tar.gz
Collecting ordereddict==1.1 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 74))
  Downloading ordereddict-1.1.tar.gz
Collecting parsedatetime==2.1 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 76))
  Downloading parsedatetime-2.1-py2-none-any.whl
Collecting pbr==1.8.1 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 79))
  Downloading pbr-1.8.1-py2.py3-none-any.whl (89kB)
Collecting psutil==3.3.0 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 82))
  Downloading psutil-3.3.0.tar.gz (261kB)
Collecting pyasn1==0.1.9 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 104))
  Downloading pyasn1-0.1.9-py2.py3-none-any.whl
Collecting pyOpenSSL==0.15.1 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 116))
  Downloading pyOpenSSL-0.15.1-py2.py3-none-any.whl (102kB)
Collecting pyRFC3339==1.0 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 119))
  Downloading pyRFC3339-1.0-py2.py3-none-any.whl
Collecting python-augeas==0.5.0 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 122))
  Downloading python-augeas-0.5.0.tar.gz (90kB)
Collecting python2-pythondialog==3.3.0 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 124))
  Downloading python2-pythondialog-3.3.0.tar.bz2 (1.8MB)
Collecting pytz==2015.7 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 127))
  Downloading pytz-2015.7-py2.py3-none-any.whl (476kB)
Collecting requests==2.9.1 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 141))
  Downloading requests-2.9.1-py2.py3-none-any.whl (501kB)
Collecting six==1.10.0 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 144))
  Downloading six-1.10.0-py2.py3-none-any.whl
Collecting traceback2==1.4.0 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 147))
  Downloading traceback2-1.4.0-py2.py3-none-any.whl
Collecting unittest2==1.1.0 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 150))
  Downloading unittest2-1.1.0-py2.py3-none-any.whl (96kB)
Collecting zope.component==4.2.2 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 153))
  Downloading zope.component-4.2.2.tar.gz (546kB)
Collecting zope.event==4.1.0 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 155))
  Downloading zope.event-4.1.0.tar.gz (476kB)
Collecting zope.interface==4.1.3 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 157))
  Downloading zope.interface-4.1.3.tar.gz (141kB)
Collecting mock==1.0.1 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 175))
  Downloading mock-1.0.1.zip (861kB)
Collecting letsencrypt==0.7.0 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 178))
  Downloading letsencrypt-0.7.0-py2-none-any.whl
Collecting acme==0.8.0 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 184))
  Downloading acme-0.8.0-py2.py3-none-any.whl (91kB)
Collecting certbot==0.8.0 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 187))
  Downloading certbot-0.8.0-py2-none-any.whl (215kB)
Collecting certbot-apache==0.8.0 (from -r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 190))
  Downloading certbot_apache-0.8.0-py2-none-any.whl (103kB)
Collecting setuptools>=1.0 (from cryptography==1.2.3->-r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 35))
In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
    setuptools>=1.0 from https://pypi.python.org/packages/a6/2b/803bd512ae9a69164ccfc29d289c99fa1b50cdfeb57aa3ab2239094e4751/setuptools-22.0.2-py2.py3-none-any.whl#md5=51dcd17dd15db58ee090565e99b0e94d (from cryptography==1.2.3->-r /tmp/tmp.8WY1y3IFg4/letsencrypt-auto-requirements.txt (line 35))
//.local/share/letsencrypt/lib64/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
You are using pip version 8.0.3, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
python pip lets-encrypt centos6
  • 1 respostas
  • 1027 Views
Martin Hope
Steffen
Asked: 2016-04-17 01:00:19 +0800 CST

rkhunter: Depois de alguns dias, recebo "O sistema mudou para não usar pré-vinculação desde a última execução."

  • 2

Executamos aqui um (novo) sistema CentOS 7. Para observar o sistema contra alterações inválidas / ataques de hackers, executamos o rkhunter todas as noites. Além disso, após cada atualização (yum), nós pré-vinculamos tudo e executamos "rkhunter --propupd".

Isso funciona bem. Mas depois de alguns dias, recebemos o seguinte erro:

[03:55:02] Warning: WARNING! It is the users responsibility to ensure that when the '--propupd' option
           is used, all the files on their system are known to be genuine, and installed from a
           reliable source. The rkhunter '--check' option will compare the current file properties
           against previously stored values, and report if any values differ. However, rkhunter
           cannot determine what has caused the change, that is for the user to do.
...
...
...
[03:55:04] Warning: Checking for prerequisites               [ Warning ]
[03:55:04]          The local host configuration or operating system has changed.
[03:55:05]   /usr/sbin/adduser                               [ Warning ]
[03:55:05] Warning: No inode value found for file '/usr/sbin/adduser' in the 'rkhunter.dat' file.
[03:55:05]   /usr/sbin/chkconfig                             [ Warning ]
[03:55:05] Warning: No inode value found for file '/usr/sbin/chkconfig' in the 'rkhunter.dat' file.
[03:55:05]   /usr/sbin/chroot                                [ Warning ]

Temos certeza de que o servidor não foi invadido. Porque verificamos a data e o tamanho de alguns dos arquivos binários. Também criamos uma soma de verificação de alguns desses arquivos. Todos os arquivos são idênticos e inalterados após a ocorrência do aviso do rkhunter.

Mas queremos descobrir qual é o motivo dos avisos do rkhunter ...

Alguma ideia?

EDITAR:

Há também outro aviso nos arquivos de log do rkhunter:

[03:55:05] Warning: The system has changed to not using prelinking since the last run.
[03:55:05]          Because of the change(s) the file properties checks may give some false-positive results.
[03:55:05]          You may need to re-run rkhunter with the '--propupd' option.

E essa também é a solução. Veja na minha resposta abaixo....

centos7 rkhunter
  • 1 respostas
  • 596 Views
Martin Hope
Steffen
Asked: 2015-12-23 08:07:43 +0800 CST

postfix: aliases serão ignorados

  • 7

Eu tenho um servidor que está configurado como um postfix MTA e no qual roda também um nó Munin. Em /etc/aliases eu adicionei:

root:    hostmaster@my.domain

no main.cf do postfix está configurado:

mydomain = my.domain
myorigin = $mydomain
alias_database = hash:/etc/aliases
relay_domains = my.domain
append_at_myorigin = no
...

Após cada alteração de aliases ou arquivos de configuração do postfix, chamei newaliasesou postmap <cfgfile>reiniciei o postfix.

Cada vez que o munin enviar um e-mail (de erro), recebo isso no arquivo maillog:

Dec 22 16:45:19 myserver postfix/pickup[21509]: 5CFBA2011E0: uid=995  rom=<munin>
Dec 22 16:45:19 myserver postfix/cleanup[22094]: 5CFBA2011E0: 
    message-id=<20151222154519.5CFBA2011E0@my.domain>
Dec 22 16:45:19 myserver postfix/qmgr[21510]: 5CFBA2011E0: from=<munin>, size=999, nrcpt=1 
    (queue active)
Dec 22 16:45:20 myserver postfix/smtp[22099]: 5CFBA2011E0: to=<root@my.domain>, 
    orig_to=<root>, relay=internal.my.domain[XXX.182.189.136]:25, delay=4.2, 
    delays=3/0.01/1.1/0.09, dsn=5.1.1, status=bounced (host 
    internal.my.domain[XXX.182.189.136] said: 550 5.1.1 <root@my.domain>: Recipient address 
    rejected: User unknown in virtual mailbox table (in reply to RCPT TO command))
Dec 22 16:45:20 myserver postfix/cleanup[22094]: A98B72012D2: 
    message-id=<20151222154520.A98B72012D2@my.domain>
Dec 22 16:45:20 myserver postfix/bounce[22100]: 5CFBA2011E0: sender non-delivery 
    notification: A98B72012D2

Não entendo porque "root" (orig_to) não foi substituído por "hostmaster@my.domain" como foi especificado no arquivo de aliases. Parece que o postfix acrescenta o myoriginvalor a "root". Não tenho certeza porque porque eu também especifiquei append_at_myorigin = no.

O que está acontecendo aqui? Desejo substituir o endereço "root" por "hostmaster@my.domain". Como eu posso fazer isso?

postfix
  • 2 respostas
  • 14756 Views
Martin Hope
Steffen
Asked: 2015-12-20 02:14:25 +0800 CST

Como desativar o RC4 no postfix?

  • 13

Fiz uma verificação de segurança do nosso servidor postfix em https://de.ssl-tools.net/mailservers e recebi um aviso de que "ECDHE_RSA_WITH_RC4_128_SHA" ainda é suportado. Mas não sei como desabilitar isso...

postfix
  • 1 respostas
  • 6308 Views
Martin Hope
Steffen
Asked: 2015-11-13 04:29:11 +0800 CST

Joomla: Por que minha pasta tmp é "não gravável"?

  • 0

Temos aqui um novo sistema CentOS7 instalado e configurado com uma nova instalação do Joomla. Estou me perguntando se todos os arquivos do Joomla são "não graváveis":

Se abrirmos no Joomla "Sistema" - "Informações do sistema" - "Permissões de pasta", todas as pastas serão listadas como "Não graváveis"

A pasta no disco é de propriedade do usuário "apache" e é gravável para o usuário:

[root@localhost joomla]# ls -la
insgesamt 88
drwxr-xr-x. 18 apache apache  4096 12. Nov 12:50 .
drwxr-xr-x.  3 apache root      19 11. Nov 18:03 ..
drwxr-x--x. 10 apache apache  4096 21. Okt 23:48 administrator
drwxr-x--x.  2 apache apache    42 21. Okt 23:48 bin
drwxr-x--x.  2 apache apache    23 21. Okt 23:48 cache
drwxr-x--x.  2 apache apache  4096 21. Okt 23:48 cli
drwxr-x--x. 16 apache apache  4096 21. Okt 23:48 components
-rw-------.  1 apache root    1902 12. Nov 12:50 configuration.php
-rwxr-x--x.  1 apache apache  2915 21. Okt 23:48 htaccess.txt
drwxr-x--x.  5 apache apache  4096 21. Okt 23:48 images
drwxr-x--x.  2 apache apache    61 21. Okt 23:48 includes
-rwxr-x--x.  1 apache apache  1212 21. Okt 23:48 index.php
-rwxr-x--x.  1 apache apache  1872 22. Okt 15:55 joomla.xml
drwxr-x--x.  4 apache apache    51 21. Okt 23:48 language
drwxr-x--x.  5 apache apache    66 21. Okt 23:48 layouts
drwxr-x--x. 11 apache apache  4096 21. Okt 23:48 libraries
-rwxr-x--x.  1 apache apache 18092 21. Okt 23:48 LICENSE.txt
drwxr-x--x.  2 apache apache    23 21. Okt 23:48 logs
drwxr-x--x. 18 apache apache  4096 21. Okt 23:48 media
drwxr-x--x. 27 apache apache  4096 21. Okt 23:48 modules
drwxr-x--x. 14 apache apache  4096 21. Okt 23:48 plugins
-rwxr-x--x.  1 apache apache  4213 21. Okt 23:48 README.txt
-rwxr-x--x.  1 apache apache   842 21. Okt 23:48 robots.txt.dist
drwxr-x--x.  5 apache apache    64 21. Okt 23:48 templates
drwxrwxrwx.  2 apache apache    23 21. Okt 23:48 tmp
-rwxr-x--x.  1 apache apache  1690 21. Okt 23:48 web.config.txt

Além disso, o httpd está sendo executado com o usuário apache:

[root@localhost joomla]# ps aux | grep httpd
root      8642  0.0  1.2 396684 13032 ?        Ss   13:16   0:00 /usr/sbin/httpd -DFOREGROUND
apache    8644  0.0  0.7 396684  7316 ?        S    13:16   0:00 /usr/sbin/httpd -DFOREGROUND
apache    8645  0.0  0.7 396684  7784 ?        S    13:16   0:00 /usr/sbin/httpd -DFOREGROUND
apache    8646  0.0  1.3 502324 13332 ?        S    13:16   0:00 /usr/sbin/httpd -DFOREGROUND
apache    8647  0.0  0.7 396684  7784 ?        S    13:16   0:00 /usr/sbin/httpd -DFOREGROUND
apache    8648  0.0  1.3 502324 13332 ?        S    13:16   0:00 /usr/sbin/httpd -DFOREGROUND
apache    8650  0.0  1.3 502324 13332 ?        S    13:17   0:00 /usr/sbin/httpd -DFOREGROUND
apache    8651  0.0  0.6 396684  6588 ?        S    13:17   0:00 /usr/sbin/httpd -DFOREGROUND
apache    8652  0.0  0.7 396684  7784 ?        S    13:17   0:00 /usr/sbin/httpd -DFOREGROUND
root      8660  0.0  0.0 112660   924 pts/0    R+   13:27   0:00 grep --color=auto httpd

Por que a pasta não é gravável?!?

httpd
  • 1 respostas
  • 856 Views
Martin Hope
Steffen
Asked: 2015-06-22 03:26:21 +0800 CST

davfs: erro de sintaxe no arquivo de segredos

  • 2

Eu tenho aqui um sistema linux que deve montar um sistema de arquivos davfs (remoto). Está tudo bem e se eu montar o sistema de arquivos manualmente na linha de comando, ele funcionará:

/> mount /share/davDrives/private 
Gib bitte den Benutzernamen für den Server https://data011.fritz.box/webdav/Shared/Public an; wenn du keinen angeben willst, drücke Return.
  Benutzername: username
Gib bitte das Passwort von username für den Server https://data011.fritz.box/webdav/Shared/Public
an; wenn du keines angeben willst, drücke Return.
  Passwort: 

(é uma instalação alemã) Depois disso, o sistema de arquivos é montado com sucesso.

Mas eu quero montar o sistema de arquivos automaticamente. Para fazer isso, devo colocar o nome de usuário e a senha em um arquivo ~/.davfs2/secrets:

/share/davDrives/private  username  myPasswordIsTopSecret 

Mas se eu tentar montar o davfs, recebo:

/> mount /share/davDrives/private 
/sbin/mount.davfs:/home/stewert.c-on/.davfs2/secrets:1: Syntaxfehler in der Zeile

("Syntaxfehler in der Zeile" == "Erro de sintaxe na linha")

O que há de errado?

linux
  • 1 respostas
  • 1091 Views
Martin Hope
Steffen
Asked: 2015-06-11 00:07:44 +0800 CST

rkhunter: "Segmentos de memória compartilhada suspeitos"

  • 16

Tenho aqui um novo servidor instalado com CentOS7 e uma instalação do GroupOffice nele. Depois de instalar o rkhunter e iniciar uma verificação do rkhunter, recebo:

[09:58:15] Suspicious Shared Memory segments
[09:58:15]   Process:     PID: 1769    Owner: apache         [ Found ]
[09:58:15]   Suspicious Shared Memory segments               [ Warning ]

Alguém sabe o que significa "segmentos de memória compartilhada suspeitos"? Como posso verificar se isso é um falso positivo? E em caso afirmativo: como posso listar esse erro na lista branca?

EDITAR

Se eu tentar listar o processo com o comando ps o processo com o PID 1769 não está lá:

# ps -p 1769
  PID TTY          TIME CMD
# ps aux | grep 1769
root     12777  0.0  0.0 112660   960 pts/0    S+   10:25   0:00 grep --color=auto 1769
# ps aux | grep apache
apache   12606  0.0  0.5 537092 10224 ?        S    10:15   0:00 /usr/sbin/httpd -DFOREGROUND
apache   12607  0.0  0.5 537092 10224 ?        S    10:15   0:00 /usr/sbin/httpd -DFOREGROUND
apache   12608  0.0  0.5 537092 10224 ?        S    10:15   0:00 /usr/sbin/httpd -DFOREGROUND
apache   12609  0.0  0.5 537092 10224 ?        S    10:15   0:00 /usr/sbin/httpd -DFOREGROUND
apache   12610  0.0  0.5 537092 10224 ?        S    10:15   0:00 /usr/sbin/httpd -DFOREGROUND
root     12779  0.0  0.0 112660   960 pts/0    S+   10:26   0:00 grep --color=auto apache
linux
  • 3 respostas
  • 21736 Views
Martin Hope
Steffen
Asked: 2015-02-20 23:54:29 +0800 CST

Como montar uma unidade smb com credenciais diferentes (nome de usuário e senha) no Linux?

  • 2

Ok, tenho aqui um laptop que roda Linux (CentOS 7). O laptop será usado por usuários diferentes (que têm todos os logins diferentes no laptop). Temos em nossa rede um servidor Samba. Todos os usuários que possuem login no laptop também possuem diferentes logins (nome de usuário e senha) para diferentes unidades SMB. A questão agora é como configurar o laptop linux para que as unidades smb para cada usuário sejam montadas automaticamente?

As dicas e sugestões padrão, como adicionar a seguinte linha ao fstab

//servername/sharename  /media/windowsshare  cifs   uid=ubuntuuser,credentials=/home/ubuntuuser/.smbcredentials,iocharset=utf8,sec=ntlm   0       0

e criar o arquivo de credenciais ( /home/ubuntuuser/.smbcredentials) não funciona no meu caso porque o arquivo de credenciais é o mesmo para cada usuário (mas deve ser diferente). Também especificar o arquivo de credencial como ~/.smbcredentialsnão funciona porque o diretório inicial ~/é desconhecido no momento da montagem ...

linux
  • 1 respostas
  • 5897 Views
Martin Hope
Steffen
Asked: 2014-12-05 00:57:01 +0800 CST

cron: O que significa status de erro de email "0x0002#012"

  • 1

Eu tenho um cron job especificado no crontab:

...
MAILTO=root
...
...
47 09 * * * tst nice -n 15 /opt/tst/bin/doMirror
...

O script doMirror falha devido a um erro de sintaxe. Eu esperava que o usuário root se tornasse uma notificação por e-mail, mas no cron log está:

Dec  4 09:47:01 f601 CROND[1163]: (CRON) ERROR chdir failed (/home/tst): Datei oder Verzeichnis nicht gefunden
Dec  4 09:47:01 f601 CROND[1161]: (tst) MAIL (mailed 60 bytes of output but got status 0x0002#012)

O que significa "obteve o status 0x0002#012". Não foi possível encontrar nenhuma informação sobre isso.

Se eu enviar um e-mail via

echo "This is only a test." | mail -s "Testing testing" root

isso funciona como esperado.

Obrigado, Steffen

linux
  • 1 respostas
  • 3651 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