Community discussions

MikroTik App
 
tomislav91
Member
Member
Topic Author
Posts: 303
Joined: Fri May 26, 2017 12:47 pm

access to wifi subnet via lan subnet

Fri Nov 23, 2018 9:07 pm

I am having a 10.106.0/24 local subnet in bridge for my devices, and some pc connected to wifi which subnet is 192.168.100.0/24.
How can i manage to get a wifi 192.168.100.40 see local subnet or just one IP 10.10.6.50/24

I tried to add src nat masqaraude but not working
add action=masquerade chain=srcnat comment="masquerade hotspot network" src-address=10.5.50.0/24 to-addresses=\
    0.0.0.0
add action=masquerade chain=srcnat comment="masquerade hotspot network" dst-address=10.10.6.0/24 src-address=\
    192.168.100.0/24
This 2 networks are on the same routers. And all have access to WAN, just want to one device see another from another subnet, or whole CIDR, never mind.
 
User avatar
sebastia
Forum Guru
Forum Guru
Posts: 1782
Joined: Tue Oct 12, 2010 3:23 am
Location: Antwerp, BE

Re: access to wifi subnet via lan subnet

Fri Nov 23, 2018 9:24 pm

Please list your configuration, so it's clear what is where...
/export compact hide-sensitive
 
tomislav91
Member
Member
Topic Author
Posts: 303
Joined: Fri May 26, 2017 12:47 pm

Re: access to wifi subnet via lan subnet

Fri Nov 23, 2018 9:33 pm

Please list your configuration, so it's clear what is where...
/export compact hide-sensitive
# model = 951Ui-2HnD
# serial number = 815708D04500
/interface bridge
auto-mac=no comment="created from master port" name=bridge1 protocol-mode=none
/interface ethernet
set [ find default-name=ether1 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full mtu=1450 \
name=ether1-GW1
set [ find default-name=ether2 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full mtu=1450
set [ find default-name=ether3 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full mtu=1450
set [ find default-name=ether4 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full mtu=1450
set [ find default-name=ether5 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full mtu=1450 \
name=ether5-GW2
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-Ce default-forwarding=no disabled=no \
distance=indoors mode=ap-bridge ssid="m1 Free WiFi"

/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
add authentication-types=wpa-psk,wpa2-psk eap-methods="" management-protection=allowed mode=dynamic-keys name=\
profile1 supplicant-identity=""
/interface wireless
add default-forwarding=no disabled=no mac-address=CE:2D:E0:12:BA:02 master-interface=wlan1 name="Privatni WLAN" \
security-profile=profile1 ssid=Private wds-cost-range=0 wds-default-cost=0
/ip ipsec proposal
set [ find default=yes ] auth-algorithms=md5 disabled=yes enc-algorithms=3des
add enc-algorithms=3des name=m1
/ip pool
add name=dhcp_pool1 ranges=10.10.6.100-10.10.6.250
add name=dhcp_pool2 ranges=10.5.50.2-10.5.50.254
add name=hs-pool-6 ranges=10.5.50.2-10.5.50.254
add name=poolPrivateWiFi ranges=192.168.100.2-192.168.100.254
/ip dhcp-server
add address-pool=dhcp_pool1 authoritative=after-2sec-delay disabled=no interface=bridge1 lease-time=20m name=\
dhcp1
add address-pool=dhcp_pool2 disabled=no interface=wlan1 name=dhcp2
add address-pool=poolPrivateWiFi disabled=no interface="Privatei WLAN" lease-time=3d name=dhcpPrivateWiFi

add bridge=bridge1 hw=no interface=ether3
add bridge=bridge1 hw=no interface=ether4
add bridge=bridge1 hw=no interface=ether2
add bridge=bridge1 interface=*B
/ip address
add address=10.10.6.1/24 interface=bridge1 network=10.10.6.0
add address=192.168.1.200/24 interface=ether5-GW2 network=192.168.1.0
add address=10.5.50.1/24 interface=wlan1 network=10.5.50.0
add address=192.168.100.1/24 comment="private WLAN" interface="Private WLAN" network=192.168.100.0
add address=10.5.50.0/24 gateway=10.5.50.1
add address=10.10.6.0/24 gateway=10.10.6.1
add address=192.168.100.0/24 comment="private WLAN" dns-server=8.8.8.8,8.8.4.4 gateway=192.168.100.1
/ip dns
set servers=8.8.8.8,8.8.4.4
/ip firewall nat
add action=passthrough chain=unused-hs-chain comment="place hotspot rules here" disabled=yes
add chain=srcnat dst-address=192.168.0.0/16 src-address=10.10.6.0/24

add action=masquerade chain=srcnat out-interface=ether1-GW1
add action=masquerade chain=srcnat out-interface=bridge1
add action=masquerade chain=srcnat out-interface=ether5-GW2
add action=masquerade chain=srcnat src-address=192.168.100.0/24
add action=masquerade chain=srcnat comment="masquerade hotspot network" src-address=10.5.50.0/24 to-addresses=\
0.0.0.0
add action=masquerade chain=srcnat comment="masquerade hotspot network" dst-address=10.10.6.0/24 src-address=\
192.168.100.0/24
add action=masquerade chain=srcnat comment="masquerade hotspot network" dst-address=192.168.100.0/24 \
src-address=10.10.6.0/24

/ip route
add check-gateway=ping distance=1 gateway=8.8.4.4
add check-gateway=ping distance=2 gateway=8.8.8.8
add distance=1 dst-address=8.8.4.4/32 gateway=192.168.1.1 scope=10
add distance=2 dst-address=8.8.8.8/32 gateway=192.168.0.1 scope=10

Who is online

Users browsing this forum: ChadRT and 134 guests