mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
docs: tproxy: fix formatting for nft code block
The nft command snippet for redirecting traffic isn't formatted in a literal code block like the rest of snippets. Fix the formatting inconsistency. Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com> Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
eaa2b34db0
commit
149a133a54
1 changed files with 2 additions and 2 deletions
|
|
@ -69,9 +69,9 @@ add rules like this to the iptables ruleset above::
|
|||
# iptables -t mangle -A PREROUTING -p tcp --dport 80 -j TPROXY \
|
||||
--tproxy-mark 0x1/0x1 --on-port 50080
|
||||
|
||||
Or the following rule to nft:
|
||||
Or the following rule to nft::
|
||||
|
||||
# nft add rule filter divert tcp dport 80 tproxy to :50080 meta mark set 1 accept
|
||||
# nft add rule filter divert tcp dport 80 tproxy to :50080 meta mark set 1 accept
|
||||
|
||||
Note that for this to work you'll have to modify the proxy to enable (SOL_IP,
|
||||
IP_TRANSPARENT) for the listening socket.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue