Community discussions

MikroTik App
 
ClaudioJunior10
just joined
Topic Author
Posts: 15
Joined: Mon Jan 23, 2017 2:38 pm

port forwarding

Fri Jun 30, 2017 12:26 am

Goodnight Mikrotik
I have a Mikrotik router and on my computer the Wamp server installed. I'm setting up a website and I plan to leave it online for external access. How can I do the port forwarding and free external access on Mikrotik to this site that I will host on my machine?
Thank you
 
User avatar
w177f
newbie
Posts: 27
Joined: Fri Jun 30, 2017 2:21 pm
Location: Dublin, Ire
Contact:

Re: port forwarding

Fri Jun 30, 2017 3:32 pm

Hello ClaudioJunior10,

From Winbox, head to IP > Firewall > NAT
Click + to create a new NAT.
Chain: dstnat
Dst. Address: "Public IP Address"
Protocol: tcp
Dst. Port: 80,443 (80=http, 443=https)
In Interface: "Interface connected to modem"
Action: dst-nat
To address: address of your computer (which should be static)

You could also create a NAT prior to the above NAT with action: add src address to list
This would enable you to record what IP's came a knockn' at the router level.

For a more detailed reply, please give us some more information about your setup such as;

What type of modem is connected to the Mikrotik, & on what interface?
What is your Public IP address?
What is the static address of your internal computer?

Cheers,

Will
 
ClaudioJunior10
just joined
Topic Author
Posts: 15
Joined: Mon Jan 23, 2017 2:38 pm

Re: port forwarding

Fri Jun 30, 2017 4:52 pm

Hi, good morning, thank you very much for your attention.
The modem that is connected to mikrotik is from the internet provider GVT (internet service provider) and is connected to the mikrotik internet interface.
The Public IP is currently 177.204.0.93.
Static IP is 192.168.0.254.
Any information I want is available and thank you for the help.
Best regards
Claudio
 
User avatar
w177f
newbie
Posts: 27
Joined: Fri Jun 30, 2017 2:21 pm
Location: Dublin, Ire
Contact:

Re: port forwarding

Mon Jul 03, 2017 5:22 pm

Is your modem bridged so 177.204.0.93 is on the internet interface on the Mikrotik?

If it is not bridged, then I suggest you start with looking at bringing your modem and using your Mikrotik as your only router before going any further with other Mikrotik experimenting.
 
ClaudioJunior10
just joined
Topic Author
Posts: 15
Joined: Mon Jan 23, 2017 2:38 pm

Re: port forwarding

Tue Jul 04, 2017 10:05 pm

Hello good afternoon.
The router is in bridge mode.
177.204.0.93 is my external IP address. On Mikrotik's internet port, the router belonging to the GVT operator is connected. But the internal IP that this router gives me at Mikrotik's internet port is 192.168.1.125
See you
 
ClaudioJunior10
just joined
Topic Author
Posts: 15
Joined: Mon Jan 23, 2017 2:38 pm

Re: port forwarding

Tue Jul 04, 2017 10:23 pm

Explaining more clearly my purpose is: from the router of the operator I connected a cable in one of its ports and the other end in the internet interface of mikortik. From this I set up to make a hotspot. With this in my house now I have 2 wifi networks, one of the mikrotik and another of the router of the internet provider. What I want to release ports in mikrotik is: when connecting to my hotspot, the user clicks a link that I put in the login screen and is redirected to my machine that contains a local server, where on that local server is hosted a site . In the hotspot in the walled garden tab, I want to release the host address of that local server (example: www.myhotspot.com) so users can browse my site without logging into the hotspot.
That's basically it.
thank you
 
User avatar
w177f
newbie
Posts: 27
Joined: Fri Jun 30, 2017 2:21 pm
Location: Dublin, Ire
Contact:

Re: port forwarding

Wed Jul 05, 2017 5:15 pm

I fear that you have not made things more clear.

You have a modem from your ISP.
This modem/router is in bridge mode, and your WAN IP address 177.204.0.93 is an interface on the Mikrotik.
The modem/router is also broadcasting a WiFi network for you.

The Mikrotik is also broadcasting a WiFi network.
When a user connects to the WiFi network being broadcast by the Mikrotik you want them to be greeted by a hotspot login page, with a link that will direct them to a site running on your local server and you wish for users to be able to browse your server without the need for authentication.

It seems that at this point, you've addressed you're previous port forwarding and have questions regarding allowing access to a specific resource prior to login, and to customise the hotspot login page.
To allow the user to access your server without logging into the hotspot, please look at https://wiki.mikrotik.com/wiki/Manual:I ... led_Garden
To customise your hotspot login page, please look at https://wiki.mikrotik.com/wiki/Manual:C ... omizations

If I am mistaken and you're still trying to get something off the ground without and aren't sure how to go about it, why don't you give us an overview of what you're trying to achieve.
 
ClaudioJunior10
just joined
Topic Author
Posts: 15
Joined: Mon Jan 23, 2017 2:38 pm

Re: port forwarding

Wed Jul 05, 2017 5:43 pm

Hello good day
The hotspot is already set up and the custom login page as well. When I set up Walled Garden for an active site and available on the internet, clicking on the link that I programmed in the login screen, browsing this site is allowed without authentication, this already happens without problems. What I want to do is exactly what you said, I want my link to direct you to a site running on my local server and I wish users to be able to browse my server without the need for authentication. To authenticate, the main objective with this redirect link is that the user navigate only to my website and that it is not necessary to open the browser and enter the address of the site.
Did I make it clearer friend?
Thank you in advance for your attention.