Community discussions

 
mmakatri
just joined
Topic Author
Posts: 5
Joined: Sat Jul 22, 2017 7:28 pm

RB1100AH with local webserver

Sat Jul 22, 2017 7:37 pm

Hello everybody

It's the first time for me with RB1100 winbox v6.27 , and what i want is to add a local web server to share some file ( Via PHP page ) from local server connected to RB1100 , so users can access to the internet or connect to this local web server and download whatever they want.

Any tips for that ?

Thank you
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2411
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: RB1100AH with local webserver

Sat Jul 22, 2017 8:21 pm

You'll need to get a MetaRouter image of a separate OS, and run your web server there.

See this manual page for details (and a link to a precompiled compatible OpenWRT image).
PEAR2_Net_RouterOS(1.0.0b6) - My API client in PHP
(Rate my posts? If you want... no pressure...)
 
User avatar
docmarius
Forum Guru
Forum Guru
Posts: 1219
Joined: Sat Nov 06, 2010 12:04 pm
Location: Timisoara, Romania
Contact:

Re: RB1100AH with local webserver

Sat Jul 22, 2017 11:46 pm

I think there could be a misunderstanding here.
By local server you mean a machime on your local network or a way to run a webserver on the router?

While a local machine on the network can be reached by using simple dst-nat (a.k.a. port forwarding), seting up a web server with php on the router itself involves either a metarouter on single core routers, or is not possible at all on multicore ones (B.t.w. RB1100AH is single core, RB1100AHx2 is dual core).
Torturing CCR1009-7G-1C-1S+, RB450G, RB750GL, RB951G-2HnD, RB960PGS, RB260GSP, OmniTIK 5HnD and NetMetal 922UAGS-5HPacD + R11e-5HnD in my home network.
 
mmakatri
just joined
Topic Author
Posts: 5
Joined: Sat Jul 22, 2017 7:28 pm

Re: RB1100AH with local webserver

Sun Jul 23, 2017 8:16 pm

Thank you very much (boen_robot & docmarius) for reply ..

What i mean by local web server , I want to connect a PC (with PHP server in it ) to the RB1100AH , to one of its Eth1 or Eth2 or....
so , is it possible ?

Thank you in advance.
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2411
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: RB1100AH with local webserver

Sun Jul 23, 2017 11:41 pm

Ah. Well it seems docmarius is right and I misunderstood.

You have a separate device, and you want... to connect it to one of the router's Ethernet ports(?!?). Physically speaking, of course you can.

Logically speaking - as docmarius said, if you're trying to make a local web server visible from the internet, you need to set up a dst-nat.

Assuming the web server's local IP is "192.168.88.254", the command to run from terminal would be:
/ip firewall nat add chain=dstnat protocol=tcp port=80 dst-address-type=local action=dst-nat to-address=192.168.88.254
Note that "port" can be a comma separated list of all ports you want to forward to the web server
In this setup, the public port 80 goes to the local port 80, although if you want, you could map one public port to a different local port.
Also, this setup completely hides webfig and hotspot. You'll have to also add an interface criteria if you want them available somewhere.
PEAR2_Net_RouterOS(1.0.0b6) - My API client in PHP
(Rate my posts? If you want... no pressure...)
 
mmakatri
just joined
Topic Author
Posts: 5
Joined: Sat Jul 22, 2017 7:28 pm

Re: RB1100AH with local webserver

Mon Jul 24, 2017 6:54 am

Thank you boen_robot ,
Yes that's what i want , to connect a PC physically to the BR1100AH , but not visible to the internet , it's just locally and the user can connect to the internet or to the local web server, there is a internet WiFi network connected to the BR1100AH ,so the WiFi client when he connect to the network he can use the internet or to go to the local web server.
Picture1.png
so from my cell phone for example i can connect to the internet or to the local web server ..
thank you
You do not have the required permissions to view the files attached to this post.
 
flynno
Member Candidate
Member Candidate
Posts: 241
Joined: Wed Aug 27, 2014 8:11 pm

Re: RB1100AH with local webserver

Mon Jul 24, 2017 7:18 pm

If you put the web server IP address into the browser address bar on your device does it not bring you to the web-server?

Are you looking to give your web-server an address like mywebserver.dns.com or something like that? if so you need to put the IP address into the STATIC DNS settings of the mikrotik router,
example IP>DNS>STATIC>ADD+> Enter as the name address "mywebserver.dns.com" and the IP address of your "web-server".
Last edited by flynno on Thu Jul 27, 2017 7:14 pm, edited 1 time in total.
 
mmakatri
just joined
Topic Author
Posts: 5
Joined: Sat Jul 22, 2017 7:28 pm

Re: RB1100AH with local webserver

Tue Jul 25, 2017 5:41 am

Thank you flynno,

Until now i didn't do anything in my RB1100AH , Because i'am not sure from what i am going to do , and Yes that what i want , to write in the browser mywebserver.com for example to go to my local server ,I will try it.

Thank you.
 
mmakatri
just joined
Topic Author
Posts: 5
Joined: Sat Jul 22, 2017 7:28 pm

Re: RB1100AH with local webserver

Tue Aug 08, 2017 8:22 pm

If you put the web server IP address into the browser address bar on your device does it not bring you to the web-server?

Are you looking to give your web-server an address like mywebserver.dns.com or something like that? if so you need to put the IP address into the STATIC DNS settings of the mikrotik router,
example IP>DNS>STATIC>ADD+> Enter as the name address "mywebserver.dns.com" and the IP address of your "web-server".

Hello , sorry for be late,

I try to do static DNS it works for another wireless computer : From my android phone i can access to my web server that also connected to thw RB1100 by wireless , it works , but i can't do it to one of its ports (eth01,eth02.....etc), that's mean if i connect my (PC) web server by Ethernet cable i can't access to it ...

any tips?

Thank you
 
flynno
Member Candidate
Member Candidate
Posts: 241
Joined: Wed Aug 27, 2014 8:11 pm

Re: RB1100AH with local webserver

Thu Aug 10, 2017 7:07 pm

If you put the web server IP address into the browser address bar on your device does it not bring you to the web-server?

Are you looking to give your web-server an address like mywebserver.dns.com or something like that? if so you need to put the IP address into the STATIC DNS settings of the mikrotik router,
example IP>DNS>STATIC>ADD+> Enter as the name address "mywebserver.dns.com" and the IP address of your "web-server".

Hello , sorry for be late,

I try to do static DNS it works for another wireless computer : From my android phone i can access to my web server that also connected to thw RB1100 by wireless , it works , but i can't do it to one of its ports (eth01,eth02.....etc), that's mean if i connect my (PC) web server by Ethernet cable i can't access to it ...

any tips?

Thank you

Is the PC in the same bridge as the Web Server?>

Who is online

Users browsing this forum: No registered users and 38 guests