This is strange, first rule works but the other ones are ignored (other ones in prerouting, the last rule masquerade works fine). Here's my before.rules:
The forwarding of port 80 to host 192.168.0.200 works fine, but forwarding from 10090 to 192.168.0.2 port 22 doesn't work. And if I interchange the rules then the forwarding to 22 works fine and to 80 on a 192.168.0.200 doesn't.Code:#nat Table rules *nat :PREROUTING ACCEPT [0:0] -A PREROUTING -i eth1 -p tcp --dport 80 -j DNAT --to 192.168.0.200:80 -A PREROUTING -i eth1 -p tcp --dport 10090 -j DNAT --to 192.168.0.2:22 :POSTROUTING ACCEPT [0:0] #forward from eth0 through eth1 -A POSTROUTING -s 192.168.0.0/24 -o eth1 -j MASQUERADE COMMIT
I assume that I need to add something to before second rule, but what?
EDIT:
It's more complicated than this... Now some rules work... other don't, I don't know where to start.
Is there some other firewall that I could use like Firestarter (I can't use it on server, because no gui) where port forwarding is easier?



Adv Reply

Bookmarks