RB751U-2Hnd NAT problems
Posted: Tue Jan 28, 2014 12:07 am
Greetings,
Let me start by saying I have probably read every post concerning RouterOS NATTing and for some reason I cannot get it to work. I have been at this for like 4 days now and finally decided to post a request for some help.
I am a process control guy, I love route-able IP ranges, so much easier for me. Unfortunately I need to make "172.16.4.52" look like "10.20.8.9". so in my head I say ok no sweat google will get me through... lol so wrong..
Here is what I am trying to accomplish I have a Modbus Gateway-"172.16.4.52" I want to be able to poll "10.20.8.9", and act the same as if I was polling 172.16.4.52 directly. I am thinking I need to NAT the two IP addresses together. Well i have tried multiple config's and here is my latest ones- any thoughts, criticisms, or anything is more than welcome.
# jan/02/1970 01:26:20 by RouterOS 6.7
# software id = xxxx-xxxx
#
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n l2mtu=2290
/interface ethernet
set [ find default-name=ether1 ] comment=WAN
set [ find default-name=ether2 ] comment=LAN
/ip neighbor discovery
set ether1 comment=WAN
set ether2 comment=LAN
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk mode=\
dynamic-keys supplicant-identity=MikroTik wpa-pre-shared-key=43F0023C82EB \
wpa2-pre-shared-key=43F0023C82EB
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m \
mac-cookie-timeout=3d
/ip address
add address=10.20.8.9/32 interface=ether1 network=10.20.8.9
add address=172.16.4.240/24 interface=ether2 network=172.16.4.0
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=wlan1
/ip firewall nat
add action=dst-nat chain=dstnat dst-address=10.20.8.9 in-interface=ether2 \
to-addresses=172.16.4.52
add action=src-nat chain=srcnat out-interface=ether1 src-address=172.16.4.52 \
to-addresses=10.20.8.9
/ip route
add disabled=yes distance=1 gateway=172.16.4.52
/system identity
set name="The Router"
/system leds
set 0 interface=wlan1
I just exported everything but I am not even going to use the wireless right now. I just had this hardware idle and wanted to utilize its routing ability.
Let me start by saying I have probably read every post concerning RouterOS NATTing and for some reason I cannot get it to work. I have been at this for like 4 days now and finally decided to post a request for some help.
I am a process control guy, I love route-able IP ranges, so much easier for me. Unfortunately I need to make "172.16.4.52" look like "10.20.8.9". so in my head I say ok no sweat google will get me through... lol so wrong..
Here is what I am trying to accomplish I have a Modbus Gateway-"172.16.4.52" I want to be able to poll "10.20.8.9", and act the same as if I was polling 172.16.4.52 directly. I am thinking I need to NAT the two IP addresses together. Well i have tried multiple config's and here is my latest ones- any thoughts, criticisms, or anything is more than welcome.
# jan/02/1970 01:26:20 by RouterOS 6.7
# software id = xxxx-xxxx
#
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n l2mtu=2290
/interface ethernet
set [ find default-name=ether1 ] comment=WAN
set [ find default-name=ether2 ] comment=LAN
/ip neighbor discovery
set ether1 comment=WAN
set ether2 comment=LAN
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk mode=\
dynamic-keys supplicant-identity=MikroTik wpa-pre-shared-key=43F0023C82EB \
wpa2-pre-shared-key=43F0023C82EB
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m \
mac-cookie-timeout=3d
/ip address
add address=10.20.8.9/32 interface=ether1 network=10.20.8.9
add address=172.16.4.240/24 interface=ether2 network=172.16.4.0
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=wlan1
/ip firewall nat
add action=dst-nat chain=dstnat dst-address=10.20.8.9 in-interface=ether2 \
to-addresses=172.16.4.52
add action=src-nat chain=srcnat out-interface=ether1 src-address=172.16.4.52 \
to-addresses=10.20.8.9
/ip route
add disabled=yes distance=1 gateway=172.16.4.52
/system identity
set name="The Router"
/system leds
set 0 interface=wlan1
I just exported everything but I am not even going to use the wireless right now. I just had this hardware idle and wanted to utilize its routing ability.