Page 1 of 1
using src nat to convert just one specific PC's IP to Public
Posted: Wed Jan 01, 2014 7:00 pm
by arashams
hi everyone!
i have a problem with my rb2011:
i have 128 public addresses but i cant use src nat to NAT 10.5.50.42(private) IP to one of my public ips x.x.x.x/25 address
i have hotspot running and i use ip binding in hotspot for this private ip address
chain=srcnat action=src-nat to-addresses=x.x.x.x src-address=10.5.50.42
out-interface=Ether1(WAN)
but when i used this my PC's internet will be disconnected
Re: using src nat to convert just one specific PC's IP to Pu
Posted: Wed Jan 01, 2014 7:02 pm
by plisken
Try with action masquerade between your hotspot and WAN
Re: using src nat to convert just one specific PC's IP to Pu
Posted: Wed Jan 01, 2014 9:18 pm
by arashams
Try with action masquerade between your hotspot and WAN
masquerade is working but ineed to translate 10.5.50.42 to someting else (x.x.x.x) that is my other public ip for example!
Re: using src nat to convert just one specific PC's IP to Pu
Posted: Thu Jan 02, 2014 5:13 pm
by plisken
Try with firewall dstnat to XXXXXX
Re: using src nat to convert just one specific PC's IP to Pu
Posted: Thu Jan 02, 2014 11:51 pm
by arashams
Try with firewall dstnat to XXXXXX
its not make sense
theoretically this is wrong i think
Re: using src nat to convert just one specific PC's IP to Pu
Posted: Thu Jan 02, 2014 11:57 pm
by arashams
Try with firewall dstnat to XXXXXX
its not make sense
theoretically this is wrong i think
i think i know where is the problem
how i could tell my router thath accept this public range of ips
iset in wan but i cant use all of them
i can use jutst x.x.x.3/25
just x.x.x.3
Re: using src nat to convert just one specific PC's IP to Pu
Posted: Fri Jan 03, 2014 2:55 am
by efaden
Try with firewall dstnat to XXXXXX
its not make sense
theoretically this is wrong i think
i think i know where is the problem
how i could tell my router thath accept this public range of ips
iset in wan but i cant use all of them
i can use jutst x.x.x.3/25
just x.x.x.3
Post your export.
Also read:
http://wiki.mikrotik.com/wiki/How_to_li ... Local_ones
Re: using src nat to convert just one specific PC's IP to Pu
Posted: Fri Jan 03, 2014 8:08 am
by arashams
ive done that!!
src nat is working at first
but the problem is here
when i put x.x.x.x/25 in ether1 mikrotik just take first ip to that interface
ive set manually another public ip to interface ether1 and then i can use my SCR nat rule and now its working
Re: using src nat to convert just one specific PC's IP to Pu
Posted: Fri Jan 03, 2014 9:28 am
by CelticComms
The SRC NAT rule which provides SCC NATing to a particular SRC IP based on certain criteria (e.g. the specific SRC Address) needs to come before the general purpose Masquerade rule. Make sure that the specific SRC NAT rule is above any Masquerade rule for the same interface.
If that doesn't help clear the problem post your NAT rules.