Answer the question
In order to leave comments, you need to log in
Iptables PREROUTING and INPUT - how to "make friends"?
Good evening!
Actually such a question.
How can I configure traffic redirection (PREROUTING) so that it first goes through the "Processing" INPUT checks?
I am currently using this rule:
-A PREROUTING -d 144.76.249.14 -j DNAT --to-destination 10.0.0.34
Answer the question
In order to leave comments, you need to log in
Create a new Filters chain and add to this chain all the rules from the INPUT chain
iptables -N Filters
iptalbes -I Filters -j ACCEPT
Add a redirect rule to the Filters chain to the INPUT chain
iptables -I INPUT -j Filters
Add a packet forwarding rule to the Filters chain to the FORWARD chain
iptables -I FORWARD -j Filters
Excuse me, why not check in the same Prerouting?
The traffic that is intended for the machine goes to Input, so no way.
Here, the logic is that the order and purpose of the traffic cannot be violated.
Create a custom validation chain and redirect to it from the INPUT and FORWARD chains
How can I configure traffic redirection (PREROUTING) so that it first goes through the "Processing" INPUT checks?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question