notebook/IT/Linux/IPTables.md

11 lines
405 B
Markdown
Raw Normal View History

2022-04-05 20:18:49 +00:00
# IPtables
## Forward un port sur un autre
2022-04-05 20:26:57 +00:00
```sh
2022-04-05 20:18:49 +00:00
iptables -t nat -A PREROUTING -p udp -m udp --dport 53 -j REDIRECT --to-ports 8600
iptables -t nat -A PREROUTING -p tcp -m tcp --dport 53 -j REDIRECT --to-ports 8600
iptables -t nat -A OUTPUT -d localhost -p udp -m udp --dport 53 -j REDIRECT --to-ports 8600
iptables -t nat -A OUTPUT -d localhost -p tcp -m tcp --dport 53 -j REDIRECT --to-ports 8600
2022-04-05 20:26:57 +00:00
```