Community discussions

MikroTik App
 
westwind80
just joined
Topic Author
Posts: 19
Joined: Tue Dec 08, 2020 10:35 am

access modem web interface

Fri Apr 14, 2023 2:39 pm

Hi all,

I'm try to access my modem web interface via LAN PC. Below are the connection details

Modem IP (192.168.0.1) Modem web interface IP (192.168.0.5)
> Mikrotik IP (assign by modem DHCP 192.168.0.20)
>Lan PC1 connected to mikrotik with IP (192.168.50.40)

What configurations should I do so than my Lan pc (192.168.50.40) and access the web interface at (192.168.0.5) ?

Any guidance is much appreciated.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 13124
Joined: Thu Mar 03, 2016 10:23 pm

Re: access modem web interface

Fri Apr 14, 2023 2:43 pm

Two options:
  1. route traffic towards modem for LAN hosts and then use modem's IP address (and port) to connect to modem GUI
  2. add port-forwarding (DST NAT) and then use router's IP and forwarded port to connect to modem GUI

In both cases you'll have to perform SRC-NAT for traffic destined at modem, in case #2 this is the other half of hair-pin NAT.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12632
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: access modem web interface

Fri Apr 14, 2023 2:47 pm

There is something strange, if the MikroTik RouterBOARD already has an address 192.168.0.x/24 you should already see the page without any other rules.
In fact the 192.168.50.x/24 of your PC should already be NATTATED with the IP of the RouterBOARD... (or not? blanked the config?....)
There's something I'm missing... or that you haven't written.

But the question is: why your modem have 2 IPs?
Is the first time I see 2 different IPs one for manage and the other for traffic, unless there are other things involved that you haven't written...
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 13124
Joined: Thu Mar 03, 2016 10:23 pm

Re: access modem web interface

Fri Apr 14, 2023 2:56 pm

.. if the MikroTik RouterBOARD already has an address 192.168.0.x/24 you should already see the page without any other rules.

Not necessarily ... modem would have to know to route replies via MT router and not via its own default route (if it exists). The SRC NAT (hairpin nat or not) cures this problem.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12632
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: access modem web interface

Fri Apr 14, 2023 3:00 pm

But if the traffic is already masqueraded/src-natted, nothing special is needed, the modem see as source 192.168.0.20, why reply to 192.168.50.40?
So, if the masquerade/src-nat is already done, no other rule is needed... (or the user "blanked the config" and do not do NAT at all....)
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 13124
Joined: Thu Mar 03, 2016 10:23 pm

Re: access modem web interface

Fri Apr 14, 2023 3:11 pm

But if the traffic is already masqueraded/src-natted,

You're assuming.

At home my ISP offers internet via PPPoE and modem is set-up in bridge mode. So WAN interface on my router is pppoe-out1 and strictly speaking only this interface needs to have SRC NAT enabled (to get internet access from LAN). In order to access management UI I need to enable SRC NAT for "raw" ethernet interface as well.

Since @OP has problems accessing modem's UI, I'm assuming (yes, me too :wink: ) that for some reason traffic towards modem's own IP address is not SRC NATed (yet).
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12632
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: access modem web interface

Fri Apr 14, 2023 3:14 pm

Really, I assumed that the user deleted the default configuration and now it doesn't work as expected... ;) :lol: :lol: :lol:

(or not? blanked the config?....)

(or the user "blanked the config" and do not do NAT at all....)
 
westwind80
just joined
Topic Author
Posts: 19
Joined: Tue Dec 08, 2020 10:35 am

Re: access modem web interface

Fri Apr 14, 2023 3:49 pm

hi,
Thanks for the advice. I'm quite new to mikrotik, can you give me guidance on how to achieve the steps you recommended? Basically, I want to be able to key in the ip 192.168.0.5 on the browser of pc 192.168.50.40 and i'll be able to access the web interface on the modem.
The reason this modem have to 2 ip address cause its used for satellite communications. It have some other features hence the 2 ip addresses.

.. if the MikroTik RouterBOARD already has an address 192.168.0.x/24 you should already see the page without any other rules.

Not necessarily ... modem would have to know to route replies via MT router and not via its own default route (if it exists). The SRC NAT (hairpin nat or not) cures this problem.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12632
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: access modem web interface

Fri Apr 14, 2023 3:57 pm

Is Starlink? About the config of the MikroTik device, is the default or you have resetted it all?
 
westwind80
just joined
Topic Author
Posts: 19
Joined: Tue Dec 08, 2020 10:35 am

Re: access modem web interface

Fri Apr 14, 2023 4:05 pm

Hi,
It is not Starlink and mikrotik is not in default. I've configured it with some firewall rules. I'm using mikrotik rb3011 series. The firewall rules basically only allow 1ip of email server. The rules are working fine.

port1 - connected to modem line
port2-8 - connected to lan with ip 192.168.50.xxx


Is Starlink? About the config of the MikroTik device, is the default or you have resetted it all?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12632
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: access modem web interface

Fri Apr 14, 2023 4:12 pm

All is working except the modem interface, right?
 
westwind80
just joined
Topic Author
Posts: 19
Joined: Tue Dec 08, 2020 10:35 am

Re: access modem web interface

Fri Apr 14, 2023 4:20 pm

Hi,
Yes, all working fine except for the modem interface.
All is working except the modem interface, right?
 
westwind80
just joined
Topic Author
Posts: 19
Joined: Tue Dec 08, 2020 10:35 am

Re: access modem web interface

Wed Apr 19, 2023 1:02 pm

hi, anyone have any ideas? I'm really stuck at this problem
 
erlinden
Forum Guru
Forum Guru
Posts: 2732
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: access modem web interface

Wed Apr 19, 2023 1:05 pm

Can you please supply both a network diagram (containing all private IP addresses), all WAN IP information from the MikroTik and a config?

/export file=anynameyoulike

Don't forget to remove serial and post between code tags []
 
westwind80
just joined
Topic Author
Posts: 19
Joined: Tue Dec 08, 2020 10:35 am

Re: access modem web interface

Wed Apr 19, 2023 1:10 pm

Modem IP (192.168.0.1) Modem web interface IP (192.168.0.5)
> Mikrotik IP (assign by modem DHCP 192.168.0.20) connected to port 1 in mikrotik
>Lan PC1 connected to mikrotik with IP (192.168.50.40) connected to port 2 in mikrotik

i have tried bridge port 1 and 3
If I manually configure pc ip address(192.168.0.20) and connect to port 3, i can access the web interface.

I want the lan pc that is connected to port 2 able to connect to 192.168.0.5 web interface without manually changing their ip address.
 
User avatar
own3r1138
Forum Veteran
Forum Veteran
Posts: 728
Joined: Sun Feb 14, 2021 12:33 am
Location: Pleiades
Contact:

Re: access modem web interface

Wed Apr 19, 2023 1:27 pm

I want the lan pc that is connected to port 2 able to connect to 192.168.0.5 web interface without manually changing their ip address.
.
/ip firewall nat
add action=src-nat chain=srcnat comment=modem dst-address=192.168.0.5 protocol=tcp dst-port=80,443 out-interface=ether1 src-address=192.168.50.40 to-addresses=192.168.0.20
 
westwind80
just joined
Topic Author
Posts: 19
Joined: Tue Dec 08, 2020 10:35 am

Re: access modem web interface

Thu Apr 20, 2023 12:53 pm

HI,
I tried your way but failed. I'm also at mistake. Actually the IP as per below

Modem IP (192.168.0.1) Modem web interface IP (10.5.5.10) NOT: (192.168.0.5)
> Mikrotik IP (assign by modem DHCP 192.168.0.20) connected to port 1 in mikrotik
>Lan PC1 connected to mikrotik with IP (192.168.50.40) connected to port 2 in mikrotik

i have tried bridge port 1 and 3
If I manually configure pc ip address(10.5.5.12) and connect to port 3, i can access the web interface.

I want the lan pc that is connected to port 2 able to connect to 10.5.5.10 web interface without manually changing their ip address.
I want the lan pc that is connected to port 2 able to connect to 192.168.0.5 web interface without manually changing their ip address.
.
/ip firewall nat
add action=src-nat chain=srcnat comment=modem dst-address=192.168.0.5 protocol=tcp dst-port=80,443 out-interface=ether1 src-address=192.168.50.40 to-addresses=192.168.0.20
 
westwind80
just joined
Topic Author
Posts: 19
Joined: Tue Dec 08, 2020 10:35 am

Re: access modem web interface

Fri Apr 21, 2023 5:42 am

Any help guys..