🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: IPv6 and Iptables

#303231
From: Grant Taylor
Date: Wed, 10 Apr 2019 01:26
124 lines
4408 bytes
On 4/9/19 5:56 PM, Red John wrote:
> What does the OUTPUT ACCEPT address [14732055:3318092577] mean below?

It's information about the OUTPUT "chain" in the given table (more 
below), it's default is "ACCEPT" has been applied to 14,732,055 packets 
/ 3,318,092,577 bytes.

> I see it's repeated twice in the table below.

There's only one OUTPUT (or any) chain in any given table.

I'm copying and pasting the same output below to annotate.

> *raw

Start of the "raw" table.

> :PREROUTING ACCEPT [20642430:4487814597]

"PREROUTING" chain in the "raw" table.

> :OUTPUT ACCEPT [14732055:3318092577]

"OUTPUT" chain in the "raw" table.

> -A PREROUTING -i eth0 -p udp -m udp --dport 53 -m string --hex-string "|0000ff0001|" --algo bm --from 40 --to 65535 -j DROP

Append a rule to the PREROUTING chain.  This particular rule DROPs 
incoming traffic that is a UDP dns query for an "ANY" record type.  (I 
block it for anti-DDoS reasons.)

> COMMIT

Apply the above to the "raw" table.

> *filter

Start of the "filter" table.

> :INPUT ACCEPT [0:0]

"INPUT" chain in the "filter" table.

> :FORWARD ACCEPT [0:0]

"FORWARD" chain in the "filter" table.

> :OUTPUT ACCEPT [14732055:3318092577]

"OUTPUT chain in the "filter table.

> -A INPUT -m state --state ESTABLISHED -j ACCEPT

Allow incoming traffic if it's part of an "ESTABLISHED" connection. 
(Stateful Packet Inspection.)

> -A INPUT -m state --state RELATED -j ACCEPT

Allow incoming traffic if it's "RELATED" to an established connection. 
(SPI, helpful for things like FTP, SIP, et al. which use multiple ports.)

> -A INPUT -p ipv6-icmp -j ACCEPT

Allow incoming ICMPv6 traffic.

> -A INPUT -i lo -j ACCEPT

Allow anything coming into loopback.  (Kernel enforces that only the 
loopback can talk to the loopback.)

> -A INPUT -p tcp -m state --state NEW -m tcp --dport 25 -j ACCEPT

Allow incoming SMTP traffic.

> -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT

Allow incoming HTTP traffic.

> -A INPUT -p tcp -m state --state NEW -m tcp --dport 119 -j ACCEPT

Allow incoming NNTP traffic.

> -A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT

Allow incoming HTTPS traffic.

> -A INPUT -p tcp -m state --state NEW -m tcp --dport 465 -j ACCEPT

Allow incoming TLS Submission traffic.

> -A INPUT -p tcp -m state --state NEW -m tcp --dport 587 -j ACCEPT

Allow incoming Submission traffic.  (Note:  MTA requires STARTTLS, so 
it's encrypted after the fact.)

> -A INPUT -p tcp -m state --state NEW -m tcp --dport 993 -j ACCEPT

Allow incoming IMAPS traffic.

> -A INPUT -p udp -m state --state NEW -m udp --dport 53 -j ACCEPT

Allow incoming UDP DNS traffic.

> -A INPUT -p tcp -m state --state NEW -m tcp --dport 53 -j ACCEPT

Allow incoming TCP DNS traffic.

> -A INPUT -j REJECT --reject-with icmp6-adm-prohibited

Reject everything else with ICMPv6 Administratively Prohibited.

Append rules to the "INPUT" chain.

> COMMIT

Apply the above to the "filter" table.

Let me know if you have any more questions.



-- 
Grant. . . .
unix || die
Technical Details
Message-ID: <q8jh16$30g$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!news.usenet.farm!..!..!not-for-mail
References: <20190409173834.7657312034B@fleegle.mixmin.net> <20190409213328.04C0D120871@fleegle.mixmin.net> <q8j55b$m8a$1@tncsrv09.home.tnetconsulting.net> <20190409235611.39ECC120850@fleegle.mixmin.net>

Show Full Headers
Complete Article Headers
Message-ID: <q8jh16$30g$1@tncsrv09.home.tnetconsulting.net>
Subject: Re: IPv6 and Iptables
Date: Tue, 9 Apr 2019 19:26:39 -0600
From: Grant Taylor <gtaylor@tnetconsulting.net>
References: <20190409173834.7657312034B@fleegle.mixmin.net> <20190409213328.04C0D120871@fleegle.mixmin.net> <q8j55b$m8a$1@tncsrv09.home.tnetconsulting.net> <20190409235611.39ECC120850@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!news.usenet.farm!..!..!not-for-mail
Newsgroups: alt.privacy.anon-server
Organization: TNet Consulting
Lines: 124
NNTP-Posting-Host: alpha.home.tnetconsulting.net
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: tncsrv09.home.tnetconsulting.net 1554859878 3088 198.18.18.251 (10 Apr 2019 01:31:18 GMT)
X-Complaints-To: newsmaster@tnetconsulting.net
NNTP-Posting-Date: Wed, 10 Apr 2019 01:31:18 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.5.3
In-Reply-To: <20190409235611.39ECC120850@fleegle.mixmin.net>
Content-Language: en-US