Community discussions

 
zizobaddy
Member Candidate
Member Candidate
Topic Author
Posts: 107
Joined: Mon Sep 13, 2010 10:13 am

How to forward public IP to Clients

Sun Aug 04, 2013 1:10 am

Dear All

I wish to forward a block of public IP to a client on my network and my Enkompass server.

Below are the things i have done

1. Net Map works perfectly for clients who require public ips and doesnt mind me forwarding it

2. IP routing 41.XXX.YY.Z/27 (Public Interface) 41.XXX.YY.Z/30 (local interface) proxy arp enabled on public and local interfaces
the issue here is that if you check the whatismyip.com it shows my routers ip and not the one i subneted

3. scr-nat and dst-nat works but just for forwarding ip

4. bridging it works but clients on dhcp and lan stops working

Im lost because i have a client who need a static ip /29 given to him so that he can use it on his GW and that it show show his ip when he check whatismyip

My enkompass server also requires same before it can activate

Please Help!!!!

Azeez
 
waver
newbie
Posts: 45
Joined: Thu May 02, 2013 2:19 pm

Re: How to forward public IP to Clients

Sun Aug 04, 2013 5:37 pm

Hi,

You need rule NAT:

First is pass the publi IP to your client. For this, configure

chain: dstnat
Source address: 0.0.0.0/0
Destination addres: your client public IP
Input interface: your interface from internet
Action:
dst-nat
To address: your client IP address (no public, for example 192.168.200.2/30)
"you need configure the internal IP in one Mikrotik interface, for example 192.168.200.1/30"

The secon rule configure to exit
Chain: dstnat
source address: 192.168.200.0/30
output interface: your interface to internet
Action:
dst-nat
To address: Public IP


If you configure this two rules, when your client check your public IP, can see the real public IP.

I have this configuration on a client and works fine!
Carlos Martínez Ramiro

MTCNA, MTCRE
 
zizobaddy
Member Candidate
Member Candidate
Topic Author
Posts: 107
Joined: Mon Sep 13, 2010 10:13 am

Re: How to forward public IP to Clients

Sun Aug 04, 2013 5:56 pm

Thanks alot waver

However kindly help me check your second rule again because i keep getting error "outgoing input does not match input and prerouting chains (6)"

Thank you
 
waver
newbie
Posts: 45
Joined: Thu May 02, 2013 2:19 pm

Re: How to forward public IP to Clients

Sun Aug 04, 2013 6:02 pm

Hi,

You need rule NAT:

First is pass the publi IP to your client. For this, configure

chain: dstnat
Source address: 0.0.0.0/0
Destination addres: your client public IP
Input interface: your interface from internet
Action:
dst-nat
To address: your client IP address (no public, for example 192.168.200.2/30)
"you need configure the internal IP in one Mikrotik interface, for example 192.168.200.1/30"

The secon rule configure to exit
Chain: srcnat
source address: 192.168.200.0/30
output interface: your interface to internet
Action:
src-nat
To address: Your client public IP


If you configure this two rules, when your client check your public IP, can see the real public IP.

I have this configuration on a client and works fine!

Excuseme, the secon rule is SOURCE NAT.


:D
Carlos Martínez Ramiro

MTCNA, MTCRE
 
zizobaddy
Member Candidate
Member Candidate
Topic Author
Posts: 107
Joined: Mon Sep 13, 2010 10:13 am

Re: How to forward public IP to Clients

Sun Aug 04, 2013 6:08 pm

Thanks once again

Pls find below the red inks
Hi,

You need rule NAT:

First is pass the publi IP to your client. For this, configure

chain: dstnat
Source address: 0.0.0.0/0
Destination addres: your client public IP
Input interface: your interface from internet (DO YOU MEAN PUBLIC INTERFACE)
Action:
dst-nat
To address: your client IP address (no public, for example 192.168.200.2/30)
"you need configure the internal IP in one Mikrotik interface, for example 192.168.200.1/30"

The secon rule configure to exit
Chain: srcnat
source address: 192.168.200.0/30
output interface: your interface to internet (DO YOU MEAN LOCAL INTERFACE)
Action:
src-nat
To address: Your client public IP


If you configure this two rules, when your client check your public IP, can see the real public IP.

I have this configuration on a client and works fine!

Excuseme, the secon rule is SOURCE NAT.


:D
 
waver
newbie
Posts: 45
Joined: Thu May 02, 2013 2:19 pm

Re: How to forward public IP to Clients

Sun Aug 04, 2013 6:17 pm

If you would like pass the public IP to your client, significate the Mikrotik is conected to internet. Have a interface for connect to internet (Is this interface you have to set in this option, same input and output) and other interface for connect to your client (in this interface configure a little network "192.168.200.0/30" to connect with hardware client).


I hope you solve the problem!
Carlos Martínez Ramiro

MTCNA, MTCRE
 
zizobaddy
Member Candidate
Member Candidate
Topic Author
Posts: 107
Joined: Mon Sep 13, 2010 10:13 am

Re: How to forward public IP to Clients

Sun Aug 04, 2013 6:24 pm

What i have here is 1 interface connected to the internet and the other to all my clients (/16)

for the config you shared with me i used just the ip of my server as a case study using the Internet intrface as both in and out interfaces in the 2 nat rules

However i still get my routers ip and not the other one

My mode of connection is not by ppoe just normal lan with dhcp
 
waver
newbie
Posts: 45
Joined: Thu May 02, 2013 2:19 pm

Re: How to forward public IP to Clients

Sun Aug 04, 2013 6:37 pm

What i have here is 1 interface connected to the internet and the other to all my clients (/16)

for the config you shared with me i used just the ip of my server as a case study using the Internet intrface as both in and out interfaces in the 2 nat rules

However i still get my routers ip and not the other one

My mode of connection is not by ppoe just normal lan with dhcp
Ok, if you have a lot of clients, you need repeat this rules for all.
You need creat a little networks for each clients, for example:
192.168.200.0/30 for first client
192.168.201.0/30 to second
...
...
If you configure the hardware client with this network and this rules on Mikrotik, finally the client will have a public IP, sure. Because all input packets to client public IP is redirected to 192.168.20X.2/30 (the IP in you client hadrware) first rule. When you go to internet, the rule send the packets with the client public IP. Second rule.

Remember the "masquerade".

:)
Carlos Martínez Ramiro

MTCNA, MTCRE
 
zizobaddy
Member Candidate
Member Candidate
Topic Author
Posts: 107
Joined: Mon Sep 13, 2010 10:13 am

Re: How to forward public IP to Clients

Sun Aug 04, 2013 8:43 pm

Thanks for your help

However it didn't work :(

I created a /30 network and assigned it

I also did the dstnat and srcnat rule

however anytime i check what is my ip it still shows my routers ip
 
zizobaddy
Member Candidate
Member Candidate
Topic Author
Posts: 107
Joined: Mon Sep 13, 2010 10:13 am

Re: How to forward public IP to Clients

Sun Aug 04, 2013 8:53 pm

Thanks waver

it works i forgot to add the Public IP to my address list

:D

Please has anyone figure out how to assign public ip without nat
 
User avatar
matiaszon
Member
Member
Posts: 305
Joined: Mon Jul 09, 2012 9:26 am

Re: How to forward public IP to Clients

Thu Mar 09, 2017 8:35 pm

Will this work the same, if applied to the below config:
[INTERNET] ----- [any MikroTik with LTE card <-> ether1] ----- [ether1=WAN RB750Gr3 router ether2-5=LAN]

What I am interested is to get the public IP from ISP assigned to ether1 of RB750Gr3. Will that work? Which LTE card will support it, if any?
 
zizobaddy
Member Candidate
Member Candidate
Topic Author
Posts: 107
Joined: Mon Sep 13, 2010 10:13 am

Re: How to forward public IP to Clients

Sun May 21, 2017 2:25 pm

Yes use netmap or dstnat

Who is online

Users browsing this forum: No registered users and 100 guests