Community discussions

MikroTik App
 
dragos2p
just joined
Topic Author
Posts: 6
Joined: Fri Sep 25, 2015 5:19 pm

Assign public IP's to computers in LAN

Fri Sep 25, 2015 5:35 pm

Hello,
i have a router AHx2 with version 6.32.1

my network is like this:
ISP IP for ether1-WAN 82.75.x.x/30 -> Mikrotik -> public class 193.230.y.y/24 configured for ether2-LAN
BGP-network.jpg
I want to be able to access the public class from outside and to have internet access on all the IP's from that class.

Anyone have any idea how can i configure the router for this?

Tks
You do not have the required permissions to view the files attached to this post.
Last edited by dragos2p on Fri Sep 25, 2015 6:14 pm, edited 1 time in total.
 
troffasky
Member
Member
Posts: 431
Joined: Wed Mar 26, 2014 4:37 pm

Re: Assign public IP's to computers in LAN

Sun Oct 04, 2015 12:38 am

From what you've posted, it appears that is already the case. Presumably you have an ACL that prevents the access, so all you need to do is remove it?
 
ulysses
Frequent Visitor
Frequent Visitor
Posts: 95
Joined: Fri Sep 25, 2015 1:26 pm

Re: Assign public IP's to computers in LAN

Sun Oct 04, 2015 5:56 pm

As long as you are not blocking forward the router will relay packets.

However, you are lacking in this case one important point: you should advertise the netwrok behind mikrotik to your provider, which in turn will advertise it further. That's the only way how computers on the internet will be able to send packets to your network - if they will follow the breadcrumbs back to mikrotik

There are number of protocols that govern route distribution over the internet. Mikrotik supports all major variants - RIP, BGP, OSPF. But the exact choice will be dependent on your provider - in case it will at all support your request.

Actually, one of the options is that you will not even have to set up any dynamic routing, if your ISP will advertise your prefixes on your behalf
 
User avatar
mousa1983
Frequent Visitor
Frequent Visitor
Posts: 75
Joined: Mon Apr 21, 2014 2:36 pm
Location: ilam-iran

Re: Assign public IP's to computers in LAN

Tue Oct 06, 2015 8:25 pm

Hi
You must masquerade 192.168.Y.Y/16
And dstnat your Public IP in to that private IP in: Firewall=>Nat
For example a user in outside of network type address of Public IP,Mikrotik translate it
to your private IP.
 
dragos2p
just joined
Topic Author
Posts: 6
Joined: Fri Sep 25, 2015 5:19 pm

Re: Assign public IP's to computers in LAN

Mon Nov 16, 2015 9:18 pm

From what you've posted, it appears that is already the case. Presumably you have an ACL that prevents the access, so all you need to do is remove it?
I have nothing in the ACL in Mikrotik
 
dragos2p
just joined
Topic Author
Posts: 6
Joined: Fri Sep 25, 2015 5:19 pm

Re: Assign public IP's to computers in LAN

Mon Nov 16, 2015 9:24 pm

Hi
You must masquerade 192.168.Y.Y/16
And dstnat your Public IP in to that private IP in: Firewall=>Nat
For example a user in outside of network type address of Public IP,Mikrotik translate it
to your private IP.
I don't have any private IP's, all are public. What i want to accomplish here is to make all the computers from the network (or at least 3) to announce themselves on the internet with there own IP's not the one set on Mikrotik WAN.
 
dragos2p
just joined
Topic Author
Posts: 6
Joined: Fri Sep 25, 2015 5:19 pm

Re: Assign public IP's to computers in LAN

Mon Nov 16, 2015 10:05 pm

As long as you are not blocking forward the router will relay packets.

However, you are lacking in this case one important point: you should advertise the netwrok behind mikrotik to your provider, which in turn will advertise it further. That's the only way how computers on the internet will be able to send packets to your network - if they will follow the breadcrumbs back to mikrotik

There are number of protocols that govern route distribution over the internet. Mikrotik supports all major variants - RIP, BGP, OSPF. But the exact choice will be dependent on your provider - in case it will at all support your request.

Actually, one of the options is that you will not even have to set up any dynamic routing, if your ISP will advertise your prefixes on your behalf
The ISP is already forwarding the public class to my WAN IP address, so i have to configure Mikrotik to accept packages for a public IP address from internet and forward to the computer behind my router.

For example, if one computer from Internet will ping one public IP from my class (eg 193.230.190.10), the ISP will forward the request to Mikrotik and this one will forward it to the computer inside with 193.230.190.10 IP.

The ISP is already doing that, but Mikrotik is not forwarding the request to the computer inside.
 
dragos2p
just joined
Topic Author
Posts: 6
Joined: Fri Sep 25, 2015 5:19 pm

Re: Assign public IP's to computers in LAN

Tue Nov 17, 2015 12:25 pm

i'm acting as an ISP in this case, i want to have behind my router public IP's and each computer to use in internet one IP as public.
 
troffasky
Member
Member
Posts: 431
Joined: Wed Mar 26, 2014 4:37 pm

Re: Assign public IP's to computers in LAN

Tue Nov 17, 2015 11:19 pm

A router with an interface in each of two subnets and not doing any NAT is just about as basic as it gets. How have you configured your router? What troubleshooting have you done?
 
telnetpr
newbie
Posts: 29
Joined: Fri Dec 18, 2015 9:02 pm

Re: Assign public IP's to computers in LAN

Sat Dec 19, 2015 11:16 pm

What about bridging your WAN with your lan port?
 
dragos2p
just joined
Topic Author
Posts: 6
Joined: Fri Sep 25, 2015 5:19 pm

Re: Assign public IP's to computers in LAN

Fri Jan 15, 2016 2:58 pm

thank you guys for you replies, I managed to solve the problem and configure the router following the info from here: http://wiki.mikrotik.com/wiki/Manual:Si ... ultihoming
In my case i have one provider for internet connection, from the second one i have only the public IP class routed on the provider public IP. The problem was the route not advertised in BGP.

In order to solve this i configured the WAN (interface 1), LAN (interface 2), DNS and GW on the mikrotik, after that i added the following:

#set our AS number
/routing bgp instance
set default as=30

#add BGP peers
/routing bgp peer
add name=ISP1 remote-address=82.75.x.y remote-as=10

/routing bgp network
add network=193.230.y.y/24 synchronize=no

/routing bgp peer
set isp1 in-filter=isp1-in out-filter=isp1-out

/routing filter
#accept our networks
add chain=isp1-out prefix=193.230.y.y/24 action=accept

Now all is working fine, from internet i can contact the public Ip class and vice versa.

Who is online

Users browsing this forum: No registered users and 23 guests