Community discussions

MikroTik App
 
arashams
newbie
Topic Author
Posts: 33
Joined: Thu Jul 04, 2013 11:20 pm

using src nat to convert just one specific PC's IP to Public

Wed Jan 01, 2014 7:00 pm

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
 
plisken
Forum Guru
Forum Guru
Posts: 2511
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: using src nat to convert just one specific PC's IP to Pu

Wed Jan 01, 2014 7:02 pm

Try with action masquerade between your hotspot and WAN
 
arashams
newbie
Topic Author
Posts: 33
Joined: Thu Jul 04, 2013 11:20 pm

Re: using src nat to convert just one specific PC's IP to Pu

Wed Jan 01, 2014 9:18 pm

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!
 
plisken
Forum Guru
Forum Guru
Posts: 2511
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: using src nat to convert just one specific PC's IP to Pu

Thu Jan 02, 2014 5:13 pm

Try with firewall dstnat to XXXXXX
 
arashams
newbie
Topic Author
Posts: 33
Joined: Thu Jul 04, 2013 11:20 pm

Re: using src nat to convert just one specific PC's IP to Pu

Thu Jan 02, 2014 11:51 pm

Try with firewall dstnat to XXXXXX
its not make sense
theoretically this is wrong i think
 
arashams
newbie
Topic Author
Posts: 33
Joined: Thu Jul 04, 2013 11:20 pm

Re: using src nat to convert just one specific PC's IP to Pu

Thu Jan 02, 2014 11:57 pm

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
 
efaden
Forum Guru
Forum Guru
Posts: 1708
Joined: Sat Mar 30, 2013 1:55 am
Location: New York, USA

Re: using src nat to convert just one specific PC's IP to Pu

Fri Jan 03, 2014 2:55 am

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
 
arashams
newbie
Topic Author
Posts: 33
Joined: Thu Jul 04, 2013 11:20 pm

Re: using src nat to convert just one specific PC's IP to Pu

Fri Jan 03, 2014 8:08 am


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
 
CelticComms
Forum Guru
Forum Guru
Posts: 1765
Joined: Wed May 02, 2012 5:48 am

Re: using src nat to convert just one specific PC's IP to Pu

Fri Jan 03, 2014 9:28 am

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.