본문 바로가기
반응형

Linux98

connect to 127.0.0.1[127.0.0.1]:10026: Connection refused 에러 ispconfig 3.1 + centos 6.x + APM + postfix ispconfig 3.1로 업그레이드 후 메일 발송이 안되는 문제가 발생하였다.maillog 내용에 기록되었다. connect to 127.0.0.1[127.0.0.1]:10026: Connection refused 인터넷상의 많은 문서를 참고하였지만 해결하기까지 2일이나 걸렸다. 이 문제는 Amavis 데몬의 오류로 판단이 된다. postfix 설정파일 /usr/local/etc/postfix/main.cf 에content_filter = smtp-amavis:[127.0.0.1:10024]아래부분에 추가하였다. smtp-amavis_destination_recipient_limit = 1 추가한후에 아래 명령을 실행하였다. .. 2019. 1. 11.
posstfix 메일 큐 관리 명령어 posstfix 메일 큐 관리 명령어 현재 큐 확인mailq 메일 큐 전체 삭제postsuper -d ALL 메일 큐 전체 재시도postfix flush또는postfix -f 메일 큐에서 deffered된 메일만 삭제postsuper -d ALL deferred 2019. 1. 11.
CentOS postfix 메일서버 postfix 메일서버 설치 yum install postfix # 호스트명 설정vi /etc/postfix/main.cf myhostname = mail.나의도메인.com # 도메인명 설정mydomain = 나의도메인.com # 메일발송시 FROM 부분 설정myorigin = $mydomain # 메일을 수신할 네트워크 지정# localhost로 지정하면.. 외부에서 보내는 메일을 받지 못함.inet_interfaces = all # 메일서버가 최종 수신처가 되는 메일수신 도메인 설정mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain # 신뢰하는 네트워크 지정 - 서버가 한대이므로.. 자신만 믿도록 하자mynetworks_sty.. 2018. 12. 17.
XAMPP 로" Apache + PHP + MySQL" 를 쉽게 간단하게 설치 예전엔 "APM Setup" 이라는 프로그램이 있어 Apache + PHP + MySQL 를 쉽게 설치 할수 있었다. 하지만, 이미 오래전부터 "APM Setup" 은 더이상 업데이를 하지 않고 있다. 그래서 과거버젼 (PHP 5.x) 을 사용하는게 아니라면 이제 더이상 "APM Setup" 을 사용할수 없게 되었다. 다행이도 Apache + PHP + MySQL 을 지원하는 패키지는 APM Setup 말고도 있다. 그 중 하나가 "XAMPP". 공식사이트 : https://www.apachefriends.org 배포처 : https://sourceforge.net/projects/xampp/ XAMPP을 이용하면 Apache + PHP + MySQL 을 별다른 절차 없이 쉽게 설치 할수 있다. 일단 배.. 2018. 8. 24.
iptables 범위 차단 iptables IP 범위 차단 방법 // iptables IP범위 차단 예 iptables -I INPUT -p all -m iprange --src-range 123.123.123.0-123.123.255.255 -j DROP 2018. 8. 20.
서브 디렉토리, 파일 권한 변경 // 디렉토리는 755 변경find ./ -type d -exec chmod -v 755 {} \; // 파일은 644 변경find ./ -type f -exec chmod -v 644 {} \; 2018. 8. 20.
RHEL/CentOS 7 에서 방화벽(firewalld) 설정하기 RHEL 7 부터는 방화벽을 관리하는 데몬이 firewalld 로 변경되었고 방화벽 설정은 복잡한 iptables 명령어대신 firewall-cmd (콘솔), firewall-config(X-Windows) 명령어를 사용하는 것을 권장합니다.firewall-cmd 는 iptables 를 쓰기 쉽게 하는 wrapper 이고 복잡한 규칙을 사용할 경우 --direct 옵션으로 iptables 내부에 접근해야 합니다. 설치설정설정 파일zone사전 정의된 존 목록 출력전체 존 목록을 상세하게 출력기본 존 출력활성화된 존 출력새로운 존 추가존 삭제서비스 목록permanent 로 등록된 서비스 목록서비스 추가서비스 삭제포트 추가포트 삭제허용 IP 추가rich-ruledirect서비스 설정웹 서버 방화벽 설정apac.. 2018. 7. 10.
CentOS minimal 설치후 추가 패키지 설치 minimal 설치후 추가할 package 필수 유틸리티와 MANUAL 설치vim 및 network 관련 유틸(nslookup, text browser) yum -y install bind-utils wget elinks vimSystem util yum -y install yum-utils sysstat system-config-firewall-tui SELinux util yum -y install policycoreutils-python setroubleshoot setroubleshoot-server setroubleshoot-doc setroubleshoot-plugins setools-console manual page yum -y install man man-pages kernel-doc 2018. 7. 10.
서버교체 후 CentOS 6 랜카드(NIC) 인식 안될때 서버 장애로 HDD는 그대로 두고 서버장비만 교체시 CentOS 랜카드 인식이 안된다. 원인 - 맥어드래스가 틀리기 때문이다. 해결방법 : 1. 서버의 BIOS 진입하여 맥어드레스를 찾아 메모한다. 2. /etc/udev/rules.d/70-persistent-net.rules , /etc/sysconfig/network-scripts/ifcfg-eth0 파일을 삭제한다. 3. 서버를 재시작한다. 4. /etc/sysconfig/network-scripts/ifcfg-eth0 파일을 수정한다. 5. service network restart 2018. 7. 2.
iptables 한국 IP 만 오픈 방법/ NO 커널컴파일 저번에는 중국 ip만 차단하는 방법을 알아봐따...이번엔 대한민국 ip 만 열어주고 외국ip는 모조리 막아보겠다. 우선 아래 사이트에가서 최신 ip대역 db를 받는다. 아래 사이트는 ip 자료가 자주 업데이트됩니다. 한번씩 업뎃 해주세용. 국가별 최신 IP대역 DB 받는 곳 : http://geolite.maxmind.com/download/geoip/database/ GeoIPCountryCSV.zip 파일을 받아서 /root밑에 다운받는다 그리고 압축을 푼다. 압축을 풀면 /root/GeoIPCountryWhois.csv 파일이 보인다. 여기까지 확인. 그리고 아래파일을 생성한다. # vi /root/only-Korea-IP-Allow.sh ---------------------------------.. 2018. 6. 26.
GeoIP 모듈을 이용한 해외 IP 차단 관리하기 GeoIP 란 MaxMind 에서 제공하는 국가별로 IP를 확인할 수 있는 오픈소스 라이브러리로 이를 이용하여 서버에 접근 하는 아이피를 국가별로 관리할 수 있습니다. 테스트 OS : CentOS 5.9 64bit 1. Apache에 GeoIP 모듈 설치하기 ​1-1. GeoIP C API 설치하기 ​# cd /usr/local/src http://geolite.maxmind.com/download/geoip/api/c/ ​# wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.4.6.tar.gz # tar xvfz GeoIP-1.4.6.tar.gz # cd GeoIP-1.4.6 #./configure --prefix=/usr/local/GeoIP.. 2018. 6. 26.
CentOS에서 crontab 설치하기 yum -y install cronie명령어를 실행 합니다. yum -y install cronie 이 명령어를 실행하면 아래와 같이 CRONTAB설치가 시작됩니다. Loaded plugins: ovl, priorities Resolving Dependencies --> Running transaction check ---> Package cronie.x86_64 0:1.4.4-15.8.amzn1 will be installed --> Processing Dependency: dailyjobs for package: cronie-1.4.4-15.8.amzn1.x86_64 --> Processing Dependency: syslog for package: cronie-1.4.4-15.8.amzn1.x86_.. 2018. 6. 3.
반응형