You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Setting chain policy not reflected in iptables output, but it does work. #297
On Thu, 23 Jan 2020 at 20:35, Steve Beaty ***@***.***> wrote:
The following does work:
chain = iptc.Chain(iptc.Table(iptc.Table.FILTER), "OUTPUT")
policy = iptc.Policy("REJECT")
chain.set_policy(policy)
and I can tell via:
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
But this isn't reflected in the output of the iptables command:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy DROP)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Machine:
Linux osboxes 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64 GNU/Linux
I'm happy that it works, but just want to make sure this is the expected
behavior.
Thanks for all the work on this!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#297?email_source=notifications&email_token=AALAJCKCQINJWY3C3JT54MLQ7HWRPA5CNFSM4KK324AKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IIK4NPA>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALAJCIYXDCNNW2PRXDY6DTQ7HWRPANCNFSM4KK324AA>
.
You’re absolutely right, I did make is DROP but my copy and paste was bad :-( I’ll fix it in the question. I still didn’t see the change in the iptables command line.
Thanks!
On Jan 23, 2020, at 12:39 PM, Jesus Llorente ***@***.***> wrote:
Hi Steve,
Shouldn’t the policy be DROP instead of REJECT?
What’s the output of “iptables-save” after you run that script?
On Thu, 23 Jan 2020 at 20:35, Steve Beaty ***@***.***> wrote:
> The following does work:
>
> chain = iptc.Chain(iptc.Table(iptc.Table.FILTER), "OUTPUT")
> policy = iptc.Policy("REJECT")
> chain.set_policy(policy)
>
> and I can tell via:
>
> PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
> ping: sendmsg: Operation not permitted
> ping: sendmsg: Operation not permitted
>
> But this isn't reflected in the output of the iptables command:
>
> Chain INPUT (policy ACCEPT)
> target prot opt source destination
>
> Chain FORWARD (policy DROP)
> target prot opt source destination
>
> Chain OUTPUT (policy ACCEPT)
> target prot opt source destination
>
> Machine:
>
> Linux osboxes 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64 GNU/Linux
>
> I'm happy that it works, but just want to make sure this is the expected
> behavior.
> Thanks for all the work on this!
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#297?email_source=notifications&email_token=AALAJCKCQINJWY3C3JT54MLQ7HWRPA5CNFSM4KK324AKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IIK4NPA>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AALAJCIYXDCNNW2PRXDY6DTQ7HWRPANCNFSM4KK324AA>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
--
Steve Beaty, Professor, MSU Denver Computer Science
Only the educated are free.
Epictetus
..and I just found the issue…
Debian now defaults to nftables with iptables-legacy being used for backwards compatibility. If I run iptables-legacy I do see the DROP.
I’ll followup to my question. Thanks much!
changed the title [-]Setting chain policy not reflected in iptables output, but is does work.[/-][+]Setting chain policy not reflected in iptables output, but it does work.[/+]on Jan 23, 2020
Activity
jllorente commentedon Jan 23, 2020
drb80 commentedon Jan 23, 2020
drb80 commentedon Jan 23, 2020
[-]Setting chain policy not reflected in iptables output, but is does work.[/-][+]Setting chain policy not reflected in iptables output, but it does work.[/+]drb80 commentedon Jan 23, 2020
Mystery solved...