Hi I am new to MikroTik Router OS, and I am still learning. I encountered a problem with port forwarding. I spent hours on Google and trying to figure out my problem but got no luck, so I am posting my issue here and hope to get some help. Thanks in advance.
Hardware: MikroTik RouterBoard 750GL
OS version: “5.2”
# telnet xx.xxx.xxx.xxx 3000
Trying xx.xxx.xxx.xxx...
telnet: connect to address xx.xxx.xxx.xxx: Connection timed out
ssh to xx.xxx.xxx.xxx port 3000 got timeout too:
$ ssh -v user@xx.xxx.xxx.xxx -p 3000
OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
debug1: Reading configuration data /home/user/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to xx.xxx.xxx.xxx [xx.xxx.xxx.xxx] port 3000.
debug1: connect to address xx.xxx.xxx.xxx port 3000: Connection timed out
I can ssh to server 192.168.88.237 from LAN, and the “iptables” on server 192.168.88.237 is disabled. ssh service is running on port 3000.
Counters on that dst-rule in firewall/NAT rule (look the attach, on right side), clear the counters then try telnet from outside and see is your traffic hits that rule, if does that traffic is forwarded to you local ip. Default gateway on that local computer is mikrotik?
I updated the ssh port on my local PC from 3000 to 3002 because 3000 has been used by other service. But still no luck.
[root@localhost ~]# service iptables status
iptables: Firewall is not running.
[root@localhost ~]# netstat -atnp | grep 3002
tcp 0 0 0.0.0.0:3002 0.0.0.0:* LISTEN 3871/sshd
tcp 0 0 :::3002 :::* LISTEN 3871/sshd
Now I am getting telnet: connect to address xx.xxx.xxx.xxx : Connection refused
Our interface list looks like the following:
eth1-mdm1 and eth2-mdm2 are two DSL lines from our ISP, they plugged into MikroTik router board port 1 and port2, eth5-gw is port 5 and connected to our D-Link switch. pppoe-out1 includes both eth1-mdm1 and eth2-mdm2 interfaces.
I also tried change in-interface to eth5-gw, still get the “Timeout”.
I really appreciate the time you spent on this and your help.
Are you trying the public IP from the same LAN the server is on or from outside the network? This will cause problems with the connection without hairpin NAT setup and trying from the same LAN. Resulting in the server refusing the connection.