first of all congratulations about this website, I just found it ...guess....googling, hehe.
Secondly, sorry for my English since I´m Spanish.
My question is about a Prerouting rule which doesn´t work in my iptable script.
The rest of rules (input, output, forward...) work fine but not this ones:
iptables -t nat -A PREROUTING -i eth2 -p tcp --dport 25 -j DNAT --to 192.168.97.4:25
(eth2 is the interface attached to the internet )
I have to say I have my script begining with DROP, like this:
iptables -p INPUT DROP iptables -p OUTPUT DROP iptables -p FORWARD DROP
But I don´t have any sentence like:
iptables -P PREROUTING ACCEPT | DROP
iptables -L -n I don´t see any rule making possible the traffic to the port TCP 25 into my LAN, that makes me think something is wrong and in Wireshark I can see how the external MTA (gmail, et cetera) tries to connect with my Firewall but only gets a SYN Packet, three packets actually.
I´ve read I need a postrouting rule for this specific port (25) but I have this rule with postrouting, which seems to me enoguh, but not sure because I come from ISA Server and things work in a different way from a GUI:
iptables -t nat -A POSTROUTING -s 192.168.97.0/24 -o eth2 -j MASQUERADE
This rule I´ve just writen is (I think) the rule about NAT, so that the Linux server can be a NAT Server.