Answer the question
In order to leave comments, you need to log in
How to share connections using iptables?
I have written user space packet processing applications. The scheme of the network is as follows:
Its essence is that I change the packet headers up to level 4. At the moment I have the following rules. Port 4222 service.
#firewall A
iptables -A FORWARD -i ens18.100 -p tcp -m tcp -j NFQUEUE --queue-num 1
iptables -A PREROUTING -t raw -i veth100 -p tcp -m tcp ! --sport 4222 ! --dport 4222 -j NFQUEUE --queue-num 2
#firewall B
iptables -A FORWARD -i ens19.88 -p tcp -m tcp -j NFQUEUE --queue-num 1
iptables -A PREROUTING -t raw -i veth88 -p tcp -m tcp ! --sport 22 ! --dport 22 -j NFQUEUE --queue-num 2
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question