i am not able to reach the internal machine from the outside. looking at the byte count for that rule, it does increment, but only a little. I have tried a number of variations without success. any ideas? are there issues port forwarding to other networks on the inside?
pings and traceroutes all seem normal.
the machine is reachable on the inside from any of the other networks.
check your firewall filter rules. sniff on the 172.21.2.67 whether if actually receives and sends packets over that forwarded connection. use firewall rule with action=log to see more info about in and out interfaces for those packets…
IP of the router’s public interface is 172.25.53.207
The counter on the first dst-nat shows the connection coming in. Second rule stays 0 and although the last, masq. rule counts up due other traffic it never counts up when no other traffic around and only the port forward should pass. (But that should be ´catched´ the rule no.2.
If I sniff on the public interface (wlan1) I see this, amongst other (winbox) traffic:
If I sniff on the private (eth1) interface nothing happens.
Same with torch, wlan1 interface shows the bytes, eth1 stays idle.
All my firewall rules are disabled for this test. I have full winbox and http acces to that router. I double checked the remote host I want to reach (a domestic Netgear Wifi router I want to manage from its WAN port. This port is opened for ALL and has address:port 192.168.50.254:8080
I tried to change the order of NAT rules, I tried with disabled masq rule for the LAN, I tried other port settings.
It just looks like traffic is get lost in the router. This is a text book setup, why the hell is it not working!
If the IP of what you’re trying to manage is 192.168.50.254, why are you port forwarding to 192.162.50.254 (second octet is different)? Since that’s a public IP address and probably not matched by any specific or connected routes, is it just going back out the wifi1 because that’s where the default route points to?
Edit: len is the packet size, a SYN packet isn’t very big at all.
towerbridgetech, if what Chupaka suggested doesn’t get you to a solution, at least post your actual routes, and firewall and NAT configuration. What you’re trying to do definitely would work.
I have a similar setup but my public ip is dynamic so i cannot specify any ip for dst-address. Can i specify the getaway interface receiving the dynamic ip instead? How do I do it?
To forward all TCP traffic except SSH to that server. The downside is that if you also need to forward UDP, ICMP etc. you’ll have to add at least one more line (without “protocol=tcp dst-port=!22”) later in the chain as that now only matches TCP traffic. So forwarding everything (all protocols) other than SSH would look like this: