質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
セキュリティー

このタグは、コンピューターシステムの安全性やデータの機密性に関連したトピックの為に使われます。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Q&A

0回答

2325閲覧

nftablesのルールを書いたのですが、添削・指摘をお願いします。

aki7777

総合スコア12

セキュリティー

このタグは、コンピューターシステムの安全性やデータの機密性に関連したトピックの為に使われます。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

0グッド

1クリップ

投稿2020/06/08 13:56

編集2020/06/08 16:01

##添削・指摘をお願いします
nftablesのルールを調べて書いたのですが、合っているのか分かりません。添削・指摘をお願いします。
OSはUbuntu18.04LTS、nftablesのバージョンは0.8.2です

#!/usr/sbin/nft -f # Reset flush ruleset # Load the external file of the IP list you want to drop include "/etc/nftables/drop_ip_list.nft" table inet filter { chain input { type filter hook input priority 0; # Default drop policy drop; # Allow ICMP ip protocol icmp counter accept; # Allow established communication ct state {established, related} accept; # Allow localhost iif lo accept; jump filter_broadcast; jump filter_fragments; jump filter_icmp; jump filter_synflood; jump filter_pingofdeath; jump filter_ipspoofing; jump drop_others; # Allow SSH tcp dport 12345 ct state new accept; # Allow Web tcp dport {80, 443} ct state new accept; jump drop_others; } chain forward { type filter hook forward priority 0; # Default drop policy drop; # Allow established communication ct state {established, related} accept; # Allow localhost iif lo accept; } chain output { type filter hook output priority 0; # Default accept policy accept; } chain filter_broadcast { pkttype != {broadcast, multicast} return; drop; } chain filter_fragments { ip frag-off & 0x1fff 0 return; limit rate 6/minute burst 10 packets log prefix "[NFTABLES FRAGMENT]: " level debug continue; drop; } chain filter_icmp { icmpv6 type { echo-request limit rate 10/minute destination-unreachable, packet-too-big, time-exceeded, parameter-problem, nd-router-advert, nd-neighbor-solicit, nd-neighbor-advert, } accept; icmp type { echo-request limit rate 10/minute destination-unreachable, router-advertisement, time-exceeded, parameter-problem, } accept; chain filter_synflood { ct state != new return; set syn_scan {ip saddr limit rate 2/second burst 100 packets} return; limit rate 6/minute burst 10 packets log prefix "[NFTABLES SYNFLOOD]: " level debug continue; drop; } chain filter_pingofdeath { icmp type != echo-request return; set ping_scan {ip saddr limit rate 1/second burst 4 packets} return; limit rate 6/minute burst 10 packets log prefix "[NFTABLES PING_OF_DEATH]: " level debug continue; drop; } chain filter_ipspoofing { ct state != new return; ip saddr 10.0.0.0/8 counter drop; ip saddr 172.16.0.0/12 counter drop; ip saddr 169.254.0.0/16 counter drop; ip saddr 192.0.2.0/24 counter drop; ip daddr 255.255.255.255 counter drop; } chain drop_others { limit rate 6/minute burst 10 packets log prefix "[NFTABLES SCANED]: " level debug continue; drop; } }

##教えて欲しいこと
これにステルススキャン対策を追加したいです。どう書けば良いでしょうか?

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

m.ts10806

2020/06/08 20:46

「合ってるか見てほしい」 「さらに追加したい」 どっちでしょうか。
aki7777

2020/06/09 05:42

両方です。
m.ts10806

2020/06/09 05:43

方やレビュー依頼 方や丸投げ(調べたこと試したことなし) で、質問になってないかと思います。
aki7777

2020/06/14 04:55

分からないなら回答しなくて結構。
m.ts10806

2020/06/14 05:07

何を根拠にそう言ってるか知らないですが、 解決する気ないなら質問しないでください。
aki7777

2020/06/14 08:08

お前こそ解決出来ないなら書き込むな。答えられないなら回答するな、邪魔なんだよ。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問