Community discussions

 
lcrhea25
Member Candidate
Member Candidate
Topic Author
Posts: 114
Joined: Wed Nov 29, 2006 4:30 pm

Please Help!! Not reporting correct IP.

Mon Jan 26, 2009 4:42 pm

Most of our customers do not need real world ip's so we give all our customers private ip's. There are a few that need them though. Most work with how we do this but their are a few that have some problems because when they do what is my IP on the internet it is reporting the ip of our main router right before our internet circuit. We are giving these real ip's out in the NAT Firewall.
chain=srcnat action=src-nat to-addresses=x.x.x.x (real IP)
src-address=x.x.x.x (private IP)

chain=dstnat action=dst-nat to-addresses=x.x.x.x (private IP)
dst-address=x.x.x.x (real IP)

Can anybody tell me another way to do this so it will report the Real IP we assign to them or what else I need to do in addition to what I have already done.

Thank you!!!
 
SurferTim
Forum Guru
Forum Guru
Posts: 4637
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Please Help!! Not reporting correct IP.

Mon Jan 26, 2009 5:27 pm

I would try this:
/ip firewall nat
add chain=srcnat action=src-nat to-addresses=xxx.xxx.xxx.xxx src-address=192.168.0.2/32
add chain=srcnat action=masquerade out-interface=ether1
This presumes the server's internal ip is 192.168.0.2
xxx.xxx.xxx.xxx is the public IP for that server.
Order is important in all entries.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8309
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Please Help!! Not reporting correct IP.

Mon Jan 26, 2009 5:33 pm

when they do what is my IP on the internet it is reporting the ip of our main router right before our internet circuit
I think it's because you use WebProxy, don't you?
Russian-speaking forum: https://forum.mikrotik.by/. Welcome!

For every complex problem, there is a solution that is simple, neat, and wrong.

MikroTik. Your life. Your routing.
 
lcrhea25
Member Candidate
Member Candidate
Topic Author
Posts: 114
Joined: Wed Nov 29, 2006 4:30 pm

Re: Please Help!! Not reporting correct IP.

Mon Jan 26, 2009 11:39 pm

I would try this:
/ip firewall nat
add chain=srcnat action=src-nat to-addresses=xxx.xxx.xxx.xxx src-address=192.168.0.2/32
add chain=srcnat action=masquerade out-interface=ether1
This presumes the server's internal ip is 192.168.0.2
xxx.xxx.xxx.xxx is the public IP for that server.
Order is important in all entries.
I tried that and it still doesn't report the ip we set them to. Also we are not running a WebProxy. Any other ideas???
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8309
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Please Help!! Not reporting correct IP.

Tue Jan 27, 2009 12:32 am

do counters on src-nat rules increase?..

please give us full export of NAT rules...
Russian-speaking forum: https://forum.mikrotik.by/. Welcome!

For every complex problem, there is a solution that is simple, neat, and wrong.

MikroTik. Your life. Your routing.
 
lcrhea25
Member Candidate
Member Candidate
Topic Author
Posts: 114
Joined: Wed Nov 29, 2006 4:30 pm

Re: Please Help!! Not reporting correct IP.

Tue Jan 27, 2009 5:05 pm

Ok the first part is where I am masquerading all our private ips so they will work on the internet. The bottom part is where I am doing the one to one nats for our customers.

/ip firewall nat
add action=masquerade chain=srcnat comment="" disabled=no src-address=\
10.10.2.0/24
add action=masquerade chain=srcnat comment="" disabled=no src-address=\
10.10.3.0/24
add action=masquerade chain=srcnat comment="" disabled=no src-address=\
10.10.4.0/24
add action=masquerade chain=srcnat comment="" disabled=no src-address=\
10.10.5.0/24
add action=masquerade chain=srcnat comment="" disabled=no src-address=\
10.10.6.0/24
add action=masquerade chain=srcnat comment="" disabled=no src-address=\
10.10.7.0/24
add action=masquerade chain=srcnat comment="" disabled=no src-address=\
10.10.9.0/26
add action=masquerade chain=srcnat comment="" disabled=no src-address=\
10.10.9.248/30
add action=masquerade chain=srcnat comment="" disabled=no src-address=\
10.10.9.252/30
add action=masquerade chain=srcnat comment=Reeps disabled=no src-address=\
10.10.2.248/30
add action=src-nat chain=srcnat comment="Leo Salas" disabled=no src-address=\
10.10.3.7 to-addresses=66.76.210.193
add action=dst-nat chain=dstnat comment="" disabled=no dst-address=\
66.76.210.193 to-addresses=10.10.3.7
add action=src-nat chain=srcnat comment="Dr. Bandel NAT" disabled=no \
src-address=10.10.3.6 to-addresses=66.76.210.194
add action=dst-nat chain=dstnat comment="" disabled=no dst-address=\
66.76.210.194 to-addresses=10.10.3.6
add action=src-nat chain=srcnat comment="Dirk Abbott" disabled=no \
src-address=10.10.6.37 to-addresses=66.76.210.195
add action=dst-nat chain=dstnat comment="" disabled=no dst-address=\
66.76.210.195 to-addresses=10.10.6.37
add action=src-nat chain=srcnat comment="Dawn Cato" disabled=no src-address=\
10.10.3.196 to-addresses=66.76.210.196
add action=dst-nat chain=dstnat comment="" disabled=no dst-address=\
66.76.210.196 to-addresses=10.10.3.196
add action=src-nat chain=srcnat comment="Edward Smith" disabled=no \
src-address=10.10.5.23 to-addresses=66.76.210.197
add action=dst-nat chain=dstnat comment="" disabled=no dst-address=\
66.76.210.197 to-addresses=10.10.5.23
add action=src-nat chain=srcnat comment="Graham Lane" disabled=no \
src-address=10.10.3.71 to-addresses=66.76.210.198
add action=dst-nat chain=dstnat comment="" disabled=no dst-address=\
66.76.210.198 to-addresses=10.10.3.71
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8309
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Please Help!! Not reporting correct IP.

Tue Jan 27, 2009 5:21 pm

hmmm... didn't you see that below rules are not working (not counting any packets)? =)

all your users are just masqueraded - move all 'individual' rules above masquerade rules
Russian-speaking forum: https://forum.mikrotik.by/. Welcome!

For every complex problem, there is a solution that is simple, neat, and wrong.

MikroTik. Your life. Your routing.
 
lcrhea25
Member Candidate
Member Candidate
Topic Author
Posts: 114
Joined: Wed Nov 29, 2006 4:30 pm

Re: Please Help!! Not reporting correct IP.

Tue Jan 27, 2009 5:55 pm

Wow it's always something simple. Thanks that did the trick it appears!! whatismyip.com is reporting correctly now. I'll have them try it for what that need it for now. Thanks again!

Who is online

Users browsing this forum: No registered users and 27 guests