Community discussions

MikroTik App
 
49er
Member
Member
Topic Author
Posts: 409
Joined: Tue Sep 27, 2011 7:55 am

Want to set up a ap client with nat

Wed Nov 14, 2018 9:59 am

Hi,

I have a RB951G-2HnD and want to set it up as an AP client to connect to a WiFi network and use NAT and have ether1 to ether5 als LAN clients.
Most is working but I have no internet access on the clients that are connected to the ether1 to ether 5 ports.

This is the config.
Wirelss is working and if I ping www.google.nl from the RB-951G-2Hnd device it is working.

On the clients connected to the mikrotik I add a static IP and DNS.

What do I miss in my config?

# Bridge the right ports
/interface bridge add name=Bridge-Lan
/interface bridge port
add interface=ether1 bridge=Bridge-Lan
add interface=ether2 bridge=Bridge-Lan
add interface=ether3 bridge=Bridge-Lan
add interface=ether4 bridge=Bridge-Lan
add interface=ether5 bridge=Bridge-Lan

# set wireless security profile
/interface wireless security-profiles
add name=Thuis wpa2-pre-shared-key=<> mode=dynamic-keys authentication-type=wpa2-psk

# Set the wireless interface
/interface wireless
set wlan1 mode=station
set wlan1 band=2ghz-onlyn
Set wlan1 channel-width=20/40mhz-Ce
set wlan1 ssid=<>
set wlan1 security-profile=Thuis
set wlan1 disabled=no

# Set DHCP Client on wlan1
/ip dhcp-client add interface=wlan1 disabled=no

# Set NAT Rule
/ip firewall nat add chain=srcnat out-interface=wlan1

# set IP on Bridge-Lan
/ip address add interface=Bridge-Lan address=172.16.100.1/24

# Set DNS server
/ip dns set server=8.8.8.8
 
Note
Frequent Visitor
Frequent Visitor
Posts: 78
Joined: Fri Jun 03, 2016 12:39 pm

Re: Want to set up a ap client with nat

Wed Nov 14, 2018 10:51 am

post also ip addresses print out.
 
49er
Member
Member
Topic Author
Posts: 409
Joined: Tue Sep 27, 2011 7:55 am

Re: Want to set up a ap client with nat

Wed Nov 14, 2018 10:55 am

Problem solved.
In the NAT rule there must also be: action=masquerade
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 18958
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Want to set up a ap client with nat

Wed Nov 14, 2018 2:09 pm

Should not the WLAN also be a bridge port?? Im assuming wifi on the router unit, if its on a separate AP, attached to an etherport all is good.

Who is online

Users browsing this forum: No registered users and 50 guests