Community discussions

MikroTik App
 
tomassp
just joined
Topic Author
Posts: 6
Joined: Tue Mar 03, 2015 11:05 am

Use WAN IP on LAN

Tue Feb 23, 2016 3:55 pm

Hi!

I'm using RB850Gx2 (powerpc) with 6.34.2 installed. There is no any specific configuration, just DHCP, some NAT rules for port forwarding and some reserved IP addresses by MAC address.
What I want is allow use WAN IP addresses in LAN. For example - one NAS drive with IP address 10.0.0.39, I can connect to ftp by ftp://10.0.0.39:21 from LAN. I'm configured that IP address to port forwarding, so I can access ftp on that NAS from outside using ftp://some.ip.address:4040. But I want that I can access ftp from outside IP in LAN. How can I do that?

Thanks!
 
kiaunel
Member Candidate
Member Candidate
Posts: 219
Joined: Mon Jul 21, 2014 7:59 pm
Location: Germany

Re: Use WAN IP on LAN

Tue Feb 23, 2016 4:55 pm

Hi!

I'm using RB850Gx2 (powerpc) with 6.34.2 installed. There is no any specific configuration, just DHCP, some NAT rules for port forwarding and some reserved IP addresses by MAC address.
What I want is allow use WAN IP addresses in LAN. For example - one NAS drive with IP address 10.0.0.39, I can connect to ftp by ftp://10.0.0.39:21 from LAN. I'm configured that IP address to port forwarding, so I can access ftp on that NAS from outside using ftp://some.ip.address:4040. But I want that I can access ftp from outside IP in LAN. How can I do that?

Thanks!
HairpinNat is what you need
ip firewall nat
add chain=srcnat src-address=10.0.0.0/24 \
dst-address=10.0.0.39 protocol=tcp dst-port=21\
out-interface=LAN action=masquerade
 
gotsprings
Forum Guru
Forum Guru
Posts: 2281
Joined: Mon May 14, 2012 9:30 pm

Re: Use WAN IP on LAN

Tue Feb 23, 2016 4:59 pm

/ip firewall nat add action=masquerade chain=srcnat dst-address=10.0.0.0/24 out-interface=\
    ether2-master-local src-address=10.0.0.0/24
Put that after your Masquerade rule. It will make all your port forwards work that have a dst-address in them rather than an interface.

Who is online

Users browsing this forum: No registered users and 14 guests