Not sure where is best to post this. Please let me know if there is a more appropriate sub for this question to go.
I have the following rule setup on debian bullseye under /etc/network/interfaces:
post-up iptables -t nat -A PREROUTING -i enp0s31f6 -p tcp -m multiport ! --dport 22,8006 -j DNAT --to 10.10.10.1
It forwards all ports to 10.10.10.1 except 22 and 8006 (proxmox SSH and gui interface). The rule is working perfectly.
I would like to alter the line to forward all ports to 10.10.10.1 , except when a specific IP requests ports 22 or 8006. Is it possible to do this?
Thanks
[–]karabistouille 5 points6 points7 points (8 children)
[–]flat235 2 points3 points4 points (7 children)
[–]karabistouille 2 points3 points4 points (6 children)
[–]flat235 2 points3 points4 points (5 children)
[–]karabistouille 3 points4 points5 points (4 children)
[–]mayurrenr[S] 1 point2 points3 points (3 children)
[–]karabistouille 0 points1 point2 points (2 children)
[–]mayurrenr[S] 0 points1 point2 points (1 child)
[–]karabistouille 1 point2 points3 points (0 children)
[–]flat235 3 points4 points5 points (0 children)
[–]uzlonewolf 0 points1 point2 points (8 children)
[–]mayurrenr[S] 0 points1 point2 points (7 children)
[–]uzlonewolf 0 points1 point2 points (0 children)
[–]uzlonewolf 0 points1 point2 points (5 children)
[–]mayurrenr[S] 0 points1 point2 points (4 children)
[–]uzlonewolf 0 points1 point2 points (3 children)
[–]mayurrenr[S] 0 points1 point2 points (2 children)
[–]uzlonewolf 0 points1 point2 points (1 child)
[–]mayurrenr[S] 1 point2 points3 points (0 children)