From: Ammar Faizi <[email protected]>
To: Alviro Iskandar Setiawan <[email protected]>
Cc: Michael William Jonathan <[email protected]>,
GNU/Weeb Mailing List <[email protected]>
Subject: [PATCH server-haj002] init_net: Allow incoming traffic from the master namespace
Date: Tue, 4 Jul 2023 04:47:48 +0700 [thread overview]
Message-ID: <[email protected]> (raw)
When spawning a shell in the master namespace, I can't perform DNS
requests because the systemd-resolved lives in the default namespace.
This requires the DNS resolver in /etc/resolv.conf to be changed to
10.3.3.2, then the default namespace has to allow DNS query traffics
from 10.3.3.1.
Let's just completely allow internal source network within CIDR source
address 10.3.3.0/24.
Signed-off-by: Ammar Faizi <[email protected]>
---
index 2c26319..404e79b 100755
--- a/init_net.sh
+++ b/init_net.sh
@@ -54,6 +54,7 @@ iptables -t filter -X;
iptables -t filter -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT;
iptables -t filter -A INPUT -p tcp -m multiport --dports 80,443,48588 -j ACCEPT;
iptables -t filter -A INPUT -p icmp -j ACCEPT;
+iptables -t filter -A INPUT -s 10.3.3.0/24 -j ACCEPT;
iptables -t filter -A INPUT -i lo -j ACCEPT;
iptables -t filter -P INPUT DROP;
--
Ammar Faizi
next reply other threads:[~2023-07-03 21:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-03 21:47 Ammar Faizi [this message]
2023-07-03 21:59 ` [PATCH server-haj002] init_net: Allow incoming traffic from the master namespace Alviro Iskandar Setiawan
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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