Cannot redirect ports with nftables

This forum is for discussion about general software issues.

Cannot redirect ports with nftables

Postby Sbyrr0 » Sun Feb 27, 2022 8:29 pm

Adding one of these tables fails with "Error: Could not process rule: No such file or directory" on Arch Linux aarch64, but not on x86_64:

$this->bbcode_second_pass_code('', '
table ip nat {
chain prerouting {
type nat hook prerouting priority 0
policy accept
tcp dport 80 dnat :8080
}
chain postrouting {
type nat hook postrouting priority 0
policy drop
}
}



table ip nat {
chain prerouting {
type nat hook prerouting priority 0
policy accept
tcp dport 80 redirect to 8080
}
chain postrouting {
type nat hook postrouting priority 0
policy drop
}
}



table ip nat {
chain prerouting {
type nat hook prerouting priority dstnat; policy accept;
tcp dport 80 redirect to 8080
}
chain postrouting {
type nat hook postrouting priority srcnat; policy accept;
}
}
')

The only difference in `zgrep NETFILTER /proc/config.gz` is

$this->bbcode_second_pass_code('', '
$ diff netfilter-aarch64.txt netfilter-x86_64.txt
18c18
< CONFIG_NETFILTER_XTABLES=y
---
> CONFIG_NETFILTER_XTABLES=m
26a27
> CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
39c40
< # CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
---
> CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
45a47
> CONFIG_NETFILTER_XT_TARGET_SECMARK=m
93a96
> CONFIG_SECURITY_SMACK_NETFILTER=y
')
Sbyrr0
 
Posts: 32
Joined: Wed May 13, 2020 10:05 pm

Return to General

Who is online

Users browsing this forum: No registered users and 41 guests