V
V
VA2020-09-08 13:41:02
Domain Name System
VA, 2020-09-08 13:41:02

How to set up stable work with a local server (by domain name) via Mikrotik?

Hello everyone,
There is a web server (Bitrix24 box) inside the local network, its internal ip-address
192.168.1.122
External network address
12.34.56.78

The web server (site) has the name
bitrix24.sitename.com
bitrix24.sitename.com A 12.34.56.78

accepts the Mikrotik router into the network
The rules for sending users to the server are configured in this way (configured 80 and 443 immediately) the provider's wire enters the eth1 interface

spoiler

1...

2. ip firewall nat:
chain=dstnat 
dst-port=80 
in-interface=eth1
action=dst-nat  
to-addr=192.168.1.122 
to-ports=80 

3. ip firewall nat:
chain=dstnat 
dst-port=443 
in-interface=eth1
action=dst-nat  
to-addr=192.168.1.122 
to-ports=443 

4. ip firewall nat:
chain=dstnat  
src-address=192.168.1.2-192.168.1.254 
dst-address=12.34.56.78 
dst-port=80
action=dst-nat  
to-addr=192.168.1.122 
to-ports=80 

5. ip firewall nat:
chain=dstnat  
src-address=192.168.1.2-192.168.1.254 
dst-address=12.34.56.78 
dst-port=443
action=dst-nat  
to-addr=192.168.1.122 
to-ports=443 

6. ip firewall nat:
chain=srcnat
src-address=192.168.1.2-192.168.1.254 
dst-address=192.168.1.122
dst-port=443
action=masquerade
to-ports=443 

7. ip firewall nat:
chain=srcnat
src-address=192.168.1.2-192.168.1.254 
dst-address=192.168.1.122
dst-port=80
action=masquerade
to-ports=80

8...



The problem is that if you connect from inside the network at bitrix24.sitename.com, then it connects every other time, falls off periodically
with the error "ERROR CONNECTION TIME_OUT". When you connect outside, everything is ok, it doesn't fall off

While I set up a temporary crutch on users' machines in the hosts file (stupidly, I agree)
192.168.1.122 bitrix24.sitename.com

What is the best way to set up my rules in Mikrotik?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
J
Janus74, 2020-09-08
@Janus74

5f57756ce8d9c319669687.jpeg

W
WP Panda, 2015-09-02
@Enniack

correct searchform.php

<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ) ?>" >
  <label class="screen-reader-text" for="s">Поиск: </label>
  <input type="text" value="<?php echo get_search_query() ?>" name="s" id="s" />
  <input type="submit" id="searchsubmit" value="найти" />
</form>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question