Skip to content

Setting chain policy not reflected in iptables output, but it does work. #297

Closed

Description

@drb80

The following does work:

chain = iptc.Chain(iptc.Table(iptc.Table.FILTER), "OUTPUT")
policy = iptc.Policy("DROP")
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!

Activity

  1. jllorente commented on Jan 23, 2020

    @jllorente
    Collaborator
  2. drb80 commented on Jan 23, 2020

    @drb80
    Author
  3. drb80 commented on Jan 23, 2020

    @drb80
    Author
  4. 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
  5. drb80 commented on Jan 23, 2020

    @drb80
    Author

    Mystery solved...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions