Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux_router:nftables [2023-07-04 Tue wk27 18:28] – [NFTables Configuration] baumkp | linux_router:nftables [2024-09-21 Sat wk38 20:29] (current) – [iptables] baumkp | ||
---|---|---|---|
Line 1: | Line 1: | ||
{{tag> | {{tag> | ||
=====NFTables Configuration===== | =====NFTables Configuration===== | ||
- | |||
The best reference for nftables is at the dedicated wiki [[https:// | The best reference for nftables is at the dedicated wiki [[https:// | ||
Line 7: | Line 6: | ||
Dont forget to ensure the router is allowed to forward packets: | Dont forget to ensure the router is allowed to forward packets: | ||
- | * '' | + | * '' |
- | * '' | + | * '' |
* '' | * '' | ||
+ | ====iptables==== | ||
+ | It is not a good idea to have both iptables and nftables rules setup at the same time. | ||
+ | *To check existing iptables rules: '' | ||
+ | <code text>-P INPUT ACCEPT | ||
+ | -P FORWARD ACCEPT | ||
+ | -P OUTPUT ACCEPT</ | ||
+ | *The iptables rules can be flushed with '' | ||
+ | |||
====Sample NFTables configuration==== | ====Sample NFTables configuration==== | ||
Line 25: | Line 32: | ||
< | < | ||
< | < | ||
+ | < | ||
< | < | ||
< | < | ||
Line 161: | Line 169: | ||
< | < | ||
< | < | ||
- | < | + | < |
- | < | + | < |
- | < | + | < |
< | < | ||
< | < | ||
Line 246: | Line 254: | ||
< | < | ||
< | < | ||
- | < | + | < |
< | < | ||
< | < | ||
Line 254: | Line 262: | ||
< | < | ||
< | < | ||
- | < | + | < |
- | < | + | < |
< | < | ||
< | < | ||
< | < | ||
- | < | + | < |
- | < | + | < |
< | < | ||
< | < | ||
Line 271: | Line 279: | ||
++++ | ++++ | ||
+ | ++++mail server ports:| | ||
+ | * smtp {25} / (smtps) submissions {465} / submission {587} - (My mail server uses smtp / submission on ports 25 / 587 respectivily) | ||
+ | * imap {143} / imaps {993} - (My mail server uses starttls on port 143) | ||
+ | * pop3 {110} / pop3s {995} - who still uses pop3? | ||
+ | '' | ||
+ | ++++ | ||
===Some configuration notes=== | ===Some configuration notes=== | ||
Line 330: | Line 344: | ||
This only affects local networks that use NAT which is basically mandatory for IPv4 and not required for IPv6, hence unless NAT is used in a IPv6 local network hairpin. | This only affects local networks that use NAT which is basically mandatory for IPv4 and not required for IPv6, hence unless NAT is used in a IPv6 local network hairpin. | ||
- | * Whilst investigating this matter commentary it was often stated that this problem is better solved using DNS. I was some what confused by SSL certificate DNS verification, | + | * Whilst investigating this matter' |
\\ | \\ | ||
\\ | \\ |