I have solved it finally.
-i and -o parameters were problem i think.
anyway, two forward rules for ssh from pcb to pca to work are:
sudo iptables -A FORWARD -s 10.0.0.0/24 -j ACCEPT // let packets from private network out to internet
sudo iptables -A FORWARD -d 10.0.0.4 -p tcp --dport 22 -j ACCEPT //let incoming packets from internet coming on router public interface on port22 to be forwared to private pcA
p.s. whats wrong with layot ? its standard cisco scheme
left is network 10.0.0.0/24 with 10.0.0.4 PCa and a router interface 10.0.0.1
right is network 192.168.1.0/24 with .1 ruter interface and .16 address of pcB
thank u myself for solving this -.-
cheers
Last edited by griswold27; 06-08-2016 at 03:36 PM.
|