通過IP歸屬地過濾Linux服務器端口流量
一、IP歸屬地數據庫中導出需要的地址段列表
二、安裝ipset
三、建立access白名單
ipset create access hash:net
四、導入IP地址
use strict; open INPUT,"output.txt"; while (<INPUT>){ my $line=$_; chomp $line; system ("ipset add access $line"); } close INPUT;
五、設置iptables規則
iptables -A INPUT -m set --match-set access src -p udp --destination-port 53 -j ACCEPT iptables -A INPUT -p udp --destination-port 53 -j DROP
本文出自 “如意靈臨” 博客,請務必保留此出處http://417722381.blog.51cto.com/7856838/1971479
通過IP歸屬地過濾Linux服務器端口流量
相關推薦
通過IP歸屬地過濾Linux服務器端口流量
歸屬地 linux 過濾 一、IP歸屬地數據庫中導出需要的地址段列表二、安裝ipset三、建立access白名單ipset create access hash:net四、導入IP地址use strict; open INPUT,"output.txt"; while (<INPUT>
檢測Linux服務器端口是否開通
隧道 之前 直接 範圍 image src 測試結果 返回 語法 現如今雲服務器已經是大勢所趨,國內比較著名的雲服務器廠商有阿裏、騰訊,國外有aws,盡管有的公司目前為止還是使用的物理機,但是無論你是使用的雲服務器還是物理機,在運行服務時都必不可少的需要監聽到指定的
Putty+Xming實現在Windows客戶端顯示Linux服務器端的圖形化程序
圖形 服務 gnome 運行 打開 執行 -- 服務器 cati 走了不少彎路啊~~~言歸正傳,最近研發和我說要在一臺EC2的機器上運行一個帶GUI的程序,當時我就納悶了:EC2的機器應該沒有桌面套件的吧,那該怎麽運行GUI的程序呢?百思不得其解時收到一封郵件,大致意思是某
SVN linux 服務器端配置
單個 手動 身份認證 available 二進制 lin cat word 常開 一. SVN 簡單介紹 Subversion(SVN) 是一個開源的版本號控制系統, 也就是說 Subversion 管理著隨時間改變的數據。 這些數據放置在一個中央資料檔案庫 (repo
iftop 監控linux服務器網卡流量
linux(1)源碼編譯安裝iftop安裝iftop必需的軟件庫:[[email protected] ~]#yum install libpcap libpcap-devel ncurses ncurses-devel[[email protected] ~]#yum install
遠程服務器端口是否開放(審計)
fff done 進行 ... 記錄日誌 rep 記錄 isp check 定期對服務器進行掃描,將危險端口有開放的服務器記錄日誌或通過郵件、微信告警出來先定義服務器列表 iplist:10.10.0.5010.10.0.5110.10.0.52....檢查端口過程如下:
無法向會話狀態服務器發出會話狀態請求。請確保 ASP.NET State Service (ASP.NET 狀態服務)已啟動,並且客戶端端口與服務器端口相同...
異常 無法 程序 cnblogs blog net ... .net asp.net 異常的具體顯示如下圖: 解決方案: (該異常並非程序異常,只是沒有開啟進程外session服務,開啟就能解決這樣的問題了) 第一步: 第二步: 重新訪問,網站正常了,問題解決
(轉)開放window是服務器端口——以8080為例
win 做了 tcp and setting 範圍 -- .com 右上角 本文記錄兩個內容: 1.win7下打開端口 2.服務器(2003或者其他老版的系統以2003為例) 測試端口時 可用telnet 命令 偵聽端口:C:\Documents and Setti
Python3_paramiko監控服務器端口(案例)
col cat stdin pass ssi /usr 服務 python3 usr #!/usr/bin/env python# _*_ coding:utf-8 _*_# Author:Mazhenkai#import osimport paramikodef cat_
linux 服務和端口
linux 端口 進程號linux 中當我們知道一個服務的名稱,需要查看端口,或者知道端口需要查看服務名稱時,我們應該怎麽做了?知道服務看端口[root@nfs ~]# netstat -lntup |grep httpd tcp 0 0 :::80
修改Tomcat服務器端口
proto 開始 機器 根節點 toc 默認 cat 多個 nec 一、修改Tomcat默認端口 1、Tomcat安裝的根目錄開始,其配置文件都放在conf目錄下,打開conf下的server.xml文件,找到server .xml中,protocol屬性值為HTT
阿裏雲服務器端口開放對外訪問權限
實例 https alt dfa IT 服務器端 rap item dex 登陸阿裏雲管理控制臺 點擊自己的實例 點擊安全組配置 點擊配置規則 點擊添加安全組規則 配置出入放心,
如何測試服務器端口通不通
not show match imp tcp esp aci open bind strong 經常會遇到測試服務器端口通不通的情況,在window上常用的是Telnet,不過Linux下Telnet是需要安裝的. 一般情況下使用"telnet ip port"判斷
python3寫的一個檢測遠程服務器端口腳本
import pat nec for conf stream sock www. lines 分兩部分:1 python腳本2 一個config.txt文件有機會在共享一下編譯成exe的文件。 1、腳本#!/usr/bin/env pythonimport osimport
juniper srx 240 cluster 內網服務器端口發布到外網配置實例
檢查 byte 域策略 3.x 服務 cati 如果 pool 端口 ======================================================================================================
查詢服務器端口腳本
urn rst div tcp echo value check first tst #!/bin/bash #IPaddr=`ifconfig | grep inet\\\\s | grep -v "127.0.0." | sed "s/addr://g"| awk ‘
如何解決haproxy服務器端口用完的問題
超出 數據包 出現 amp 例如 系統 如果 rec 客戶端 Haproxy負載作為負載均衡服務器,肯定會和客戶端建立很多的連接,而這些都需要消耗端口資源。當端口資源被消耗殆盡的時候,服務器隨之就會出現異常。那麽該如何解決這個問題呢?在網上看了很多網友的文章,整理成了如下的
開放windows服務器端口-----以打開端口8080為例
out 服務器 啟用 iis7 系統 設置 window 進入 網絡連接 本文記錄兩個內容:1.win7下打開端口2.服務器(2003或者其他老版的系統以2003為例)測試端口時 可用telnet 命令 偵聽端口:C:\Documents and Settings\a
Linux服務器通過aws命令行上傳文件至S3
aws linux s3 上傳文件目的Linux服務器通過AWS命令行上傳文件至S3配置打開你的AWS控制臺;連接你的Linux服務器,按照以下步驟操作;# 安裝pip yum -y install python-pip # 安裝awscli pip install awscli # 初始化配置 aw
CentOS 安裝rz和sz命令 lrzsz(通過Xshell向Linux服務器上傳文件)
到你 dem zmodem .cn ftp linux install 自動 all lrzsz在liunx裏面可代替ftp上傳可下載。 lrzsz是一個unix通信套件提供的X,Y和ZModem文件傳輸協議。 winddows需要向centos服務器上傳文件,可直接