次のようなテストがあります。
私の環境:
OS:デビアン8
A:172.20.0.1 (gateway suricata v3.2 )
B:172.20.0.2 (App Server)
C:172.20.0.3 (Client)
私のネットワーク:
client(C) ----> gateway suricata A (ids) -----> AppServer B
私のsuricataビルド情報:
wget https://github.com/inliniac/suricata/archive/suricata-3.2.zip
unar suricata-3.2.zip
cd suricata-3.2
git clone https://github.com/OISF/libhtp.git
./configure --enable-nfqueue --enable-pfring --enable-hiredis --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make
make install
make install-conf
make install-rules
そして、テスト ルールのみをロードします。
alert http any any -> any any (msg:"http test"; content:"GET";) #no.1
alert tcp any any -> any any (msg:"tcp test"; content:"GET";) #no.2
alert tcp any any -> any any (msg:"tcp http test"; content:"GET";http_method;) #no.3
A:172.20.0.1 (ゲートウェイ suricata) OS 情報:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -F
iptables -F
iptables -A FORWARD -j ACCEPT
クライアントは次のようにリクエストを送信します
'http://172.20.0.2/test'
fast.log を追跡します。#2 のルールのみが一致します
次のようなiptablesでnatを開こうとしました:
iptables -t nat -A POSTROUTING -j MASQUERADE
そして今回は #1 #2 #3 のルールが一致した
しかし、アプリサーバーが正しいクライアントIPを取得しなかったというnatが開かれました
住所。
そして今、http_uri、http_methodなどの7層プロトコルを使用したいと思います。nat は閉じている必要があります。
私は正しい方法が欲しい〜〜〜ありがとう!