2023년 10월 20일 금요일

[Linux]_VSFTP 로그 파일 포맷

 [ 출처 : https://docs.oracle.com/ ]


The xferlog file contains transfer logging information from the FTP Server, in.ftpd(1M). You can use the logfile capability to change the location of the log file. See ftpaccess(4).

Each server entry is composed of a single line of the following form. All fields are separated by spaces.

current-time  transfer-time    remote-host  file-size  filename  
transfer-type  special-action-flag  direction access-mode  username
service-name  authentication-method  authenticated-user-id completion-status

The fields are defined as follows:

current-time

    The current local time in the form DDD MMM dd hh:mm:ss YYYY, where:

    DDD    :    Is the day of the week
    MMM   :    Is the month
    dd        :    Is the day of the month
    hh        :     Is the hour
    mm      :     Is the minutes
    ss        :     Is the seconds
    YYYY   :     Is the year

transfer-time
    The total time in seconds for the transfer

remote-host
    The remote host name

file-size
    The number of bytes transferred

filename
    The name of the transferred file

transfer-type
    A single character indicating the type of transfer:
    a   :     Indicates an ascii transfer
    b   :     Indicates a binary transfer

special-action-flag
    One or more single character flags that indicate any special action taken. The special-action-flag can have one of more of the following values:
    C   :    File was compressed
    U   :    File was uncompressed
    T   :    File was archived, for example, by using tar(1)

    _ (underbar)
        No action was taken.

direction
    The direction of the transfer. direction can have one of the following values:
    o   :   Outgoing
    i    :    Incoming

access-mode
    The method by which the user is logged in. access-mode can have one of the following values:
    a   :    For an anonymous user.
    g   :    For a passworded guest user. See the description of the guestgroup capability in ftpaccess(4).
    r   :     For a real, locally authenticated user

username
    The local username, or if anonymous, the ID string given

service-name
    The name of the service invoked, usually ftp

authentication-method
    The method of authentication used. authentication-method can have one of the following values:
    0   :    None
    1   :    RFC 931 authentication

authenticated-user-id
    The user ID returned by the authentication method. A * is used if an authenticated user ID is not available.

completion-status
    A single character indicating the status of the transfer. completion-status can have one of the following values:
    c   :     Indicates complete transfer
    i    :     Indicates incomplete transfer


2023년 10월 19일 목요일

[Linux] fail2ban에서 차단된 IP 해제

 [ 출처 : https://blog.naver.com/]

# fail2ban-client postfix

 Status for the jail: postfix
|- Filter
|  |- Currently failed: 4
|  |- Total failed:     7
|  `- File list:        /var/log/maillog
`- Actions
   |- Currently banned: 0
   |- Total banned:     1
   `- Banned IP list: 121.xxx.xxx.x

로그에서 차단된 IP를 확인

# cat /var/log/fail2ban.log* | grep "] Ban"|awk '{print $NF}' | sort | uniq -c | sort -n

차단된 IP를 해제
# fail2ban-client set postfix unbanip 121.xxx.xxx.x

2023년 8월 17일 목요일

[Linux] Postfix 설정 관련 내용

 [ 출처 : https://ablog.jc-lab.net/ ]

설정상에 표시되는 내용 정리


permit_mynetworks : mynetworks에 정의된 네트워트로 들어오는 요청에 대하여 허용

permit_sasl_authenticated : sasl(아이디/비번) 인증된 사용자 허용

reject_sender_login_mismath : 보내는이(from Id)와 sasl 인증 사용자 다르면 거부

reject_non_fqdn_helo_hostname : 도메인 이름이 정규화된 이름 또는 리터럴 형식이 아닐 경우 거부(smtpd_helo_required=yes설정 필요)

reject_unknown_helo_hostname : 존재하지 않는 도메인(DNS A or MX)에서 보내온 메일은 거부

reject_unknown_hostname : 자신의 hostname을 모르는 메일 시스템은 거부

reject_unknown_sender_domain : 존재하지 않는 도메인 메일은 거부

reject _unauth_pipelining : pipelining 명령을 못 알아듯는 클라이언트 차단



2023년 6월 29일 목요일

[Linux]_네트워크 관리

 

[ 출처 : https://tpcable.co.kr/ , https://www.lesstif.com/ ]

네트워크 조회

# nmcli con show







네트워크 설정

# nmcli con mod "System eth0" ipv4.address 192.0.2.2/24 ipv4.gateway 192.0.2.254 ipv4.dns "8.8.8.8 168.126.63.1"

DHCP 활성화

# nmcli device modify "System eth0" ipv4.method auto

부팅시 자동 활성화

# nmcli con mod "System eth0" connection.autoconnect yes

 네트워크 재부팅

# systemctl restart NetworkManager.service 

디바이스 상태 확인(아이피 부여된 상태 전체 조회)

#nmcli device show

네트워크 온오프(유선/무선)

# nmcli net on/off      nmcli radio wifi on/off

네트워크 활성화

# nmcli connection up

 



[Linux] Rocky VM 명령어

 [ 출처 : https://techviewleo.com/ ]


리눅스 기존 가상 프로그램을 SSH상에서 조회 및 제어하는 방법임.

# virsh list --all






 

#Start VM
  virsh start VM_name

#Stop VM
  virsh stop VM_name

#Save current state of running VM
  virsh save VM_name VM_name_save

#Restore saved VM
  virsh restore VM_name_save

#Reboot
  virsh reboot VM_name

#Pause/Suspend VM
  virsh suspend VM_name

#Resume Suspended VM
 virsh resume VM_name

#Shutdown
  virsh shutdown VM_name

#Expunge
 virsh destroy VM_name

2023년 6월 7일 수요일

[ORACLE] 아카이빙 모드 확인 하는법

아래 명령어로 아카이빙 모드 확인 및 대상 파일 위치 확인 가능함.

C:\Users\Administrator>sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 7 08:10:54 2023

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            D:\archive
Oldest online log sequence     31974
Next log sequence to archive   31976
Current log sequence           31976

2023년 4월 13일 목요일

[Linux] XRDP로 접속 후 프로그램 실행 오류 발생

 [ 출처 : https://github.com/ ]


xrdp로 접속 후 프로그램 실행시 cannot open display 1 오류 발생

# systemctl set-default multi-user.target
# reboot