Community discussions

MikroTik App
 
absolute
newbie
Topic Author
Posts: 28
Joined: Sat Jul 07, 2007 11:01 am

How can I connect to ROS using winbox from different network

Sat Nov 10, 2007 10:09 am

Sorry for being so newbie. I have tried searching on this forum, but could not find the answer.

I have this network:

Server ROS1 = 192.168.9.2

Server ROS2 NIC1 = 192.168.9.1
Server ROS2 NIC2 = 192.168.2.1
Server ROS2 NIC3 = IP.From.My.ISP

My PC = 192.168.2.2

How can I connect to ROS1 using winbox from My PC 192.168.2.2 -> 192.168.2.1 -> 192.168.9.1 -> 192.168.9.2 ?

I have managed to be able to ping 192.168.9.2 from My PC, using dst-nat, so I should be able to connect to ROS1 using winbox, weirdly when I tried to connect, winbox says "Wrong username or password" !!

Any one can help me with this? Thank you.
 
pedja
Long time Member
Long time Member
Posts: 684
Joined: Sat Feb 26, 2005 5:37 am

Re: How can I connect to ROS using winbox from different network

Sat Nov 10, 2007 11:40 am

If MT is behind the NAT which is alsa MT you cannot. Winbox tries to reach MT on fixed port. That port is used by MT that runs as NAT, so you reach it. Other MT, behind NAT is not possible to reach, because you cannot chang port on which it tries to connect to MT (so you cannot move it to another port and then DST-NAT that port to other MT).

We requested development team to allow winbox port to be changed when needed long time ago but for some reason they do not want to allow that.

But, you may create pptp link to that MT, or any MT in his local, and after you establish pptp connection, that network, and MT would be reachable.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8394
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: How can I connect to ROS using winbox from different network

Sat Nov 10, 2007 12:47 pm

omg... why not just setup routing?.. enable RIP or OSPF on both routers =)
Russian-speaking forum: https://forum.mikrotik.by/. Welcome!

For every complex problem, there is a solution that is simple, neat, and wrong.

MikroTik. Your life. Your routing.
 
absolute
newbie
Topic Author
Posts: 28
Joined: Sat Jul 07, 2007 11:01 am

Re: How can I connect to ROS using winbox from different network

Sat Nov 10, 2007 1:00 pm

Thanks guys for replying,

Well Chupaka, will you please give me a bit enlightenment by using an example? Meanwhile I am trying to read more about RIP or OSPF. Thank you.
 
bushy
Member Candidate
Member Candidate
Posts: 140
Joined: Thu Oct 20, 2005 11:56 pm
Location: Ireland

Re: How can I connect to ROS using winbox from different network

Sat Nov 10, 2007 3:00 pm

Try using an ssh tunnel
 
galaxynet
Long time Member
Long time Member
Posts: 648
Joined: Fri Dec 17, 2004 2:52 pm
Contact:

Re: How can I connect to ROS using winbox from different network

Sat Nov 10, 2007 3:20 pm

absolute -
You don't need RIP / BGP or OSPF to do this - it is very simple.... You don't need to change the port numbers either...

Take the dst nat rule out - it's not necessary.

Put a static route in ROS1 that tells it the gateway to 192.168.2.0/netmask (probably 24 in your case) is 192.168.9.1 (ROS2 NIC1). In Winbox it is easy, IP / Route, '+' to add a route. Terminal mode is something like this; /ip route add destination address=192.168.2.0/24 gateway=192.168.9.1

Also be sure in IP / Route / Rule you have at least this one rule; src-addr 0.0.0.0/0 . dst-addr 0.0.0.0/0 , lookup-table=main
Thom Lawless
General Manager
RapidWiFi, LLC
thom.lawless [at] rapidwifi.com
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8394
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: How can I connect to ROS using winbox from different network

Sat Nov 10, 2007 5:00 pm

Also be sure in IP / Route / Rule you have at least this one rule; src-addr 0.0.0.0/0 . dst-addr 0.0.0.0/0 , lookup-table=main
for what?..
Russian-speaking forum: https://forum.mikrotik.by/. Welcome!

For every complex problem, there is a solution that is simple, neat, and wrong.

MikroTik. Your life. Your routing.
 
galaxynet
Long time Member
Long time Member
Posts: 648
Joined: Fri Dec 17, 2004 2:52 pm
Contact:

Re: How can I connect to ROS using winbox from different network

Sat Nov 10, 2007 5:27 pm

Chupaka -
RTM
Through several years of using MT and Linux and several hundred MT deployments, it has been my experience that if you DON'T give some kind of 'default' / 'failsafe' that different versions/revisions can actually 'get lost' routing an unknown packet and sometimes a known packet.

This 'trick' though not explictly spelled out is implied in the manual.

This rule, as the last rule, ensures that as a last resort, the router will lookup in the routing table the default route and send the packet there....
Thom Lawless
General Manager
RapidWiFi, LLC
thom.lawless [at] rapidwifi.com
 
absolute
newbie
Topic Author
Posts: 28
Joined: Sat Jul 07, 2007 11:01 am

Re: How can I connect to ROS using winbox from different network

Sat Nov 10, 2007 6:03 pm

Bravo!! it works now! thanks guys for replying. Especially to you galaxynet, you gave me the idea how it works.

The problem so far that caused I could not connect using winbox to other network was because every connection from BOTH 192.168.2.2 (My PC) and 192.168.9.2 (ROS1) will be nat-masqueraded to ROS2 NIC3 (IP.From.My.ISP).

For weeks, I have already managed to be able to connect 192.168.2.2 (My PC) -> 192.168.2.1 -> 192.168.9.1 -> 192.168.9.2 (ROS1), but I wonder why my PC never got replied winbox connection at all.

Unfortunately, I was not aware of that every REPLY winbox connection from 192.168.9.2 (ROS1) to 192.168.2.2 (My PC) was being Nat-masqueraded to ROS2 NIC3 (My ISP) also!!

Now both connection to/from ROS1 are NOT being Nat-masqueraded to ROS2 NIC3 (IP.From.My.ISP), which now they have their own route/path to communicate to each other.

Big thanks galaxynet! I really appreciate the help.

P.S. Now I use separated mangle for winbox connection (port 8291) from other mangle.

Who is online

Users browsing this forum: Google [Bot], sid5632 and 116 guests