Community discussions

MikroTik App
 
TWCC
just joined
Topic Author
Posts: 4
Joined: Tue Aug 06, 2019 9:15 pm

Reaching device

Sat Jul 03, 2021 10:22 pm

Hi all!
I have some difficulties reaching the device that brings me the Internet connection.

This is the situation: the port 1 of the router (hAP lite v. 6.48.3) is statically configured with my public IP address, and routes go accordingly. Ports from 2 to 4 plus wlan are bridged and are part of the LAN.
Everything works fine: I can surf the web, reaching other computers on the LAN and so on.

The problem is that I would like to reach the device that is connected to the port 1. It's a station that is configured with the 10.1.20.1/24 address. If I connect directly to the device configuring statically my computer with some random address like 10.1.20.100/24 I can reach it and see the working parameters.

I've tried to put a switch before the router, and enter in both port 1 and a port of the bridge, but I don't know how to configure the bridge itself to reach the device.

Any adivice is appreciated!
Thank you

Denis
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Reaching device

Sun Jul 04, 2021 1:08 am

remove what you have tryed to do,

put 10.1.20.100/24 on ether1

paste this on terminal
/ip fire nat
add action=src-nat chain=srcnat dst-address=10.1.20.1 to-addresses=10.1.20.100
You now can open 10.1.20.1, but only if some firewall rules do not obstacle it.
 
TWCC
just joined
Topic Author
Posts: 4
Joined: Tue Aug 06, 2019 9:15 pm

Re: Reaching device

Sun Jul 04, 2021 1:08 pm

Hi!
Thank you for your reply.
I've cleaned up the configuration and tryed what you suggested me, but it doesnt work.
Right now, the complete setup is this one, maybe with all the parameters it's easier
/interface bridge
add admin-mac=*** auto-mac=no name=bridge
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX country="us 2.4 5.8" disabled=no distance=indoors frequency=auto frequency-mode=manual-txpower installation=indoor mode=ap-bridge ssid=*** wireless-protocol=802.11
/interface pwr-line
set [ find default-name=pwr-line1 ] disabled=yes
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa2-psk eap-methods="" mode=dynamic-keys supplicant-identity=MikroTik wpa2-pre-shared-key=***
/ip pool
add name=default-dhcp ranges=192.168.1.180-192.168.1.250
/ip dhcp-server
add add-arp=yes address-pool=default-dhcp disabled=no interface=bridge name=defconf
/interface bridge port
add bridge=bridge interface=ether2
add bridge=bridge interface=ether3
add bridge=bridge interface=ether4
add bridge=bridge interface=pwr-line1
add bridge=bridge interface=wlan1
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add interface=bridge list=LAN
add interface=ether1 list=WAN
/ip address
add address=192.168.1.1/24 interface=bridge network=192.168.1.0
add address=*** interface=ether1 network=***
add address=10.1.20.100/24 interface=ether1 network=10.1.20.0
/ip dhcp-client
add comment=defconf disabled=no interface=ether1
/ip dhcp-server network
add address=192.168.1.0/24 comment=defconf domain=lan.local gateway=192.168.1.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,208.67.222.222,8.8.4.4,208.67.220.220
/ip dns static
add address=192.168.1.1 comment=defconf name=router.local.lan
/ip firewall nat
add action=masquerade chain=srcnat ipsec-policy=out,none out-interface-list=WAN 
add action=src-nat chain=srcnat dst-address=10.1.20.1 to-addresses=10.1.20.100
/ip firewall service-port
set ftp disabled=yes
set tftp disabled=yes
set irc disabled=yes
set h323 disabled=yes
set pptp disabled=yes
set udplite disabled=yes
set dccp disabled=yes
set sctp disabled=yes
/ip route
add distance=1 gateway=*** pref-src=*** scope=10
/ip service
set telnet disabled=yes
set ftp disabled=yes
set ssh disabled=yes
set www-ssl disabled=no
set api disabled=yes
set api-ssl disabled=yes
/system clock
set time-zone-name=Europe/Rome
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
Thank you!

Who is online

Users browsing this forum: No registered users and 33 guests