Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable environment variable expansion #67

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

f1-outsourcing
Copy link

now this is the command:
/usr/sbin/iptables -t filter -A OUTPUT -o $CNI_IFNAME -p icmp -d 0/0 --icmp-type 8 -j ACCEPT --wait

CNI_IFNAME is listed as interface in the iptables output

[@ firewallnetns]#ip netns exec testing iptables -L -vn
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     icmp --  $CNI_IFNAME *       0.0.0.0/0            0.0.0.0/0            icmptype 8
    0     0 ACCEPT     icmp --  $CNI_IFNAME *       0.0.0.0/0            0.0.0.0/0            icmptype 0
    0     0 ACCEPT     all  --  *      *       192.168.122.159      0.0.0.0/0

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     icmp --  *      $CNI_IFNAME  0.0.0.0/0            0.0.0.0/0            icmptype 0
    0     0 ACCEPT     icmp --  *      $CNI_IFNAME  0.0.0.0/0            0.0.0.0/0            icmptype 8

should be this:
/usr/sbin/iptables -t filter -A OUTPUT -o eth0 -p icmp -d 0/0 --icmp-type 8 -j ACCEPT --wait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant