iptables
This module allows management of iptables rules from FakerNet. These rules will always be added when FakerNet starts. This makes it useful for setting up things like NAT.
Warning
Rules are always added at the top. Use the list_order
to get a better idea of the order the rules will be added.
Warning
Rules are not removed when FakerNet stops
Note
!
can be used in add_nat_allow
to do a “not” of the range
See Parameter Types for parameter types.
list
View iptables rules
list_order
View iptables rules in order they will appear (opposite of addition)
show_ifaces
Show configured interfaces
set_external_iface
Set the external interface (used for NAT)
Name |
Type |
---|---|
iface |
SIMPLE_STRING |
set_internal_iface
Set the internal inferface
Name |
Type |
---|---|
iface |
SIMPLE_STRING |
add_nat_allow
Add NAT rule (adds to top of chain)
Name |
Type |
---|---|
range |
TEXT |
add_raw
Add raw rule (adds to top of chain)
Name |
Type |
---|---|
cmd |
ADVTEXT |
chain |
SIMPLE_STRING |
add_raw_to_table
Add rule to table (adds to top of chain)
Name |
Type |
---|---|
cmd |
ADVTEXT |
table |
SIMPLE_STRING |
chain |
SIMPLE_STRING |
remove_rule
Remove a iptables rule
Name |
Type |
---|---|
id |
INTEGER |