wiki:proxy:iptables:nat_command
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
wiki:proxy:iptables:nat_command [2025/03/31 23:01] – [Prèrequis] hmattaliano | wiki:proxy:iptables:nat_command [2025/03/31 23:05] (current) – hmattaliano | ||
---|---|---|---|
Line 10: | Line 10: | ||
Cela active le routage des paquets dans le noyau linux | Cela active le routage des paquets dans le noyau linux | ||
- | Redirection de port | + | ===== Redirection de port ===== |
< | < | ||
Line 21: | Line 22: | ||
iptables -t nat -A PREROUTING -d 203.0.113.10 -i eth0 -p tcp --dport 80 -j DNAT --to-destination 192.168.1.100: | iptables -t nat -A PREROUTING -d 203.0.113.10 -i eth0 -p tcp --dport 80 -j DNAT --to-destination 192.168.1.100: | ||
</ | </ | ||
+ | |||
+ | ===== Afficher les règles de NAT existantes ===== | ||
+ | |||
+ | < | ||
+ | iptables -t nat -L --line-numbers | ||
+ | </ | ||
+ | |||
+ | ===== Supprimer une règle de NAT ===== | ||
+ | |||
+ | < | ||
+ | iptables -t nat -D POSTROUTING < | ||
+ | </ | ||
+ | |||
+ | (Exemple : Supprimer la 1) | ||
+ | < | ||
+ | iptables -t nat -D POSTROUTING 1 | ||
+ | </ | ||
+ |
wiki/proxy/iptables/nat_command.1743454903.txt.gz · Last modified: 2025/03/31 23:01 by hmattaliano