From: Dmitry Korzhevin <dmitry.korzhevin@stidia.com>
To: netfilter-devel@vger.kernel.org
Subject: Iptables udp ports advice
Date: Mon, 28 Apr 2014 11:55:14 +0300 [thread overview]
Message-ID: <535E1772.2010907@stidia.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1390 bytes --]
Hi,
Thank you for answer! Can you please advice the best way to:
I have next services, working with udp:
netstat -ulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address
State PID/Program name
udp 0 0 0.0.0.0:500 0.0.0.0:*
22822/charon
udp 0 0 0.0.0.0:1701 0.0.0.0:*
3023/xl2tpd
udp 0 0 162.243.246.152:6000 0.0.0.0:*
22931/openvpn
udp 0 0 0.0.0.0:4500 0.0.0.0:*
22822/charon
udp6 0 0 :::500 :::*
22822/charon
udp6 0 0 :::4500 :::*
22822/charon
Can you please advice best option to allow this services and block all
other upd?
I use next rules:
iptables -I OUTPUT 2 -p udp --dport 53 -j ACCEPT
iptables -I OUTPUT 2 -p udp --dport 1701 -j ACCEPT
iptables -I OUTPUT 3 -p udp -m udp --dport 1812 -j ACCEPT
iptables -I OUTPUT 4 -p udp -m udp --dport 1813 -j ACCEPT
iptables -I OUTPUT 5 -p udp -m udp --dport 1813 -j ACCEPT
iptables -I OUTPUT 5 -p udp -m udp --dport 6000 -j ACCEPT
iptables -I OUTPUT 5 -p udp -m udp --dport 500 -j ACCEPT
iptables -I OUTPUT 5 -p udp -m udp --dport 4500 -j ACCEPT
iptables -I OUTPUT 10 -p udp -j DROP
Best Regards,
Dmitry
---
Dmitry KORZHEVIN
[-- Attachment #2: Криптографическая подпись S/MIME --]
[-- Type: application/pkcs7-signature, Size: 4587 bytes --]
reply other threads:[~2014-04-28 9:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=535E1772.2010907@stidia.com \
--to=dmitry.korzhevin@stidia.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).