🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.privacy.anon-server
Article #303220

Re: IPv6 and Iptables

#303220
From: Grant Taylor
Date: Tue, 09 Apr 2019 22:04
49 lines
2942 bytes
On 4/9/19 3:33 PM, Red John wrote:
> Can a remailer share their rules.v6 file so I can use as a baseline for 
> my server.

Here's what I have.

*raw
:PREROUTING ACCEPT [20642430:4487814597]
:OUTPUT ACCEPT [14732055:3318092577]
-A PREROUTING -i eth0 -p udp -m udp --dport 53 -m string --hex-string 
"|0000ff0001|" --algo bm --from 40 --to 65535 -j DROP
COMMIT
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [14732055:3318092577]
-A INPUT -m state --state ESTABLISHED -j ACCEPT
-A INPUT -m state --state RELATED -j ACCEPT
-A INPUT -p ipv6-icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 25 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 119 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 465 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 587 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 993 -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport 53 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 53 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp6-adm-prohibited
COMMIT

I would think that your IPv6 firewall (ip6tables) would be very similar 
to your IPv4 firewall (iptables).

You can likely /almost/ copy it.  There are some differences in syntax. 
Most notably IP addresses and ICMP nuances.

I've always been able to adapt output from iptables-save to be used with 
ip6tables-restore.

Remember that ip(6)tables-save can pipe directly into 
ip(6)tables-restore, or be stored in an intermediate file.



-- 
Grant. . . .
unix || die
Technical Details
Message-ID: <q8j55b$m8a$1@tncsrv09.home.tnetconsulting.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <20190409173834.7657312034B@fleegle.mixmin.net> <20190409213328.04C0D120871@fleegle.mixmin.net>

Show Full Headers
Complete Article Headers
Message-ID: <q8j55b$m8a$1@tncsrv09.home.tnetconsulting.net>
Subject: Re: IPv6 and Iptables
Date: Tue, 9 Apr 2019 16:04:05 -0600
From: Grant Taylor <gtaylor@tnetconsulting.net>
References: <20190409173834.7657312034B@fleegle.mixmin.net> <20190409213328.04C0D120871@fleegle.mixmin.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Content-Type: text/plain; charset=utf-8; format=flowed
Nntp-Posting-Date: Tue, 9 Apr 2019 22:08:43 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3
Mime-Version: 1.0
Content-Language: en-US
Lines: 49
Nntp-Posting-Host: alpha.home.tnetconsulting.net
X-Received-Body-Crc: 4136330668
Organization: TNet Consulting
Content-Transfer-Encoding: 7bit
X-Trace: tncsrv09.home.tnetconsulting.net 1554847723 22794 198.18.18.251 (9 Apr 2019 22:08:43 GMT)
X-Complaints-To: newsmaster@tnetconsulting.net
In-Reply-To: <20190409213328.04C0D120871@fleegle.mixmin.net>
X-Received-Bytes: 3027
Newsgroups: alt.privacy.anon-server