Page 1 of 1

access modem web interface

Posted: Fri Apr 14, 2023 2:39 pm
by westwind80
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.

Re: access modem web interface

Posted: Fri Apr 14, 2023 2:43 pm
by mkx
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.

Re: access modem web interface

Posted: Fri Apr 14, 2023 2:47 pm
by rextended
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...

Re: access modem web interface

Posted: Fri Apr 14, 2023 2:56 pm
by mkx
.. 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.

Re: access modem web interface

Posted: Fri Apr 14, 2023 3:00 pm
by rextended
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....)

Re: access modem web interface

Posted: Fri Apr 14, 2023 3:11 pm
by mkx
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).

Re: access modem web interface

Posted: Fri Apr 14, 2023 3:14 pm
by rextended
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....)

Re: access modem web interface

Posted: Fri Apr 14, 2023 3:49 pm
by westwind80
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.

Re: access modem web interface

Posted: Fri Apr 14, 2023 3:57 pm
by rextended
Is Starlink? About the config of the MikroTik device, is the default or you have resetted it all?

Re: access modem web interface

Posted: Fri Apr 14, 2023 4:05 pm
by westwind80
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?

Re: access modem web interface

Posted: Fri Apr 14, 2023 4:12 pm
by rextended
All is working except the modem interface, right?

Re: access modem web interface

Posted: Fri Apr 14, 2023 4:20 pm
by westwind80
Hi,
Yes, all working fine except for the modem interface.
All is working except the modem interface, right?

Re: access modem web interface

Posted: Wed Apr 19, 2023 1:02 pm
by westwind80
hi, anyone have any ideas? I'm really stuck at this problem

Re: access modem web interface

Posted: Wed Apr 19, 2023 1:05 pm
by erlinden
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 []

Re: access modem web interface

Posted: Wed Apr 19, 2023 1:10 pm
by westwind80
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.

Re: access modem web interface

Posted: Wed Apr 19, 2023 1:27 pm
by own3r1138
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

Re: access modem web interface

Posted: Thu Apr 20, 2023 12:53 pm
by westwind80
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

Re: access modem web interface

Posted: Fri Apr 21, 2023 5:42 am
by westwind80
Any help guys..