Jump to content

Many wan ip's through a router

rufee

So this topic has been haunting me for some time now not even sure how to formulate it right, I got a few global IP's assigned by my ISP via DHCP and I want to "run" them through a router, to assign a specific one to my server and have the other one be put behind a router as if I had only one IP.

Ordinary consumer routers don't work for this, dd-wrt kinda works for this, but there has to be something static.

I definitely know that a Mikrotik can do this, but the guys on their forums are of no help.

What I need here is thoughts on how I could achieve this.

And if it didn't sink in yet here's a diagram:

2iGKXCc.png

I could just use a switch for the server and route the clients.

The server and clients don't have be in a LAN.

Ideas welcome.

Something wrong with your connection ?

Run the damn cable :)

Link to comment
Share on other sites

Link to post
Share on other sites

You need to make a DMZ (demilitarized zone) for that server, then it will be directly connected to the internet.

Link to comment
Share on other sites

Link to post
Share on other sites

I have that set up right now, but the clients are connecting through the same ip as the servers (meaning I only have it set up as a ordinary router for 1 IP), and I want them to connect through the other IP.

Something wrong with your connection ?

Run the damn cable :)

Link to comment
Share on other sites

Link to post
Share on other sites

PFSense is capable of this, and handles it quite easily

Link to comment
Share on other sites

Link to post
Share on other sites

Alright I will try pfsense.

Something wrong with your connection ?

Run the damn cable :)

Link to comment
Share on other sites

Link to post
Share on other sites

rufee, instead of trying pfsense why not use policy routing with your mikrotik. If I was in your position I would set one of my interfaces (eth1) to be one IP and then set another interface (eth2) to be the other IP, and then just branch off of those ports. Look at the first part of this site, I think this is a route you can go (http://home.swkls.org/mikrotik-policy-based-routing/). Or here

is something along this line on the mikrotik wiki (http://wiki.mikrotik.com/wiki/Testwiki/IP_routing#Policy_routing_implementation_example)

Link to comment
Share on other sites

Link to post
Share on other sites

Must have overlooked that, though that means I will have to use a switch to "split" my connections from the 1 wire I get ?

Something wrong with your connection ?

Run the damn cable :)

Link to comment
Share on other sites

Link to post
Share on other sites

Must have overlooked that' date=' though that means I will have to use a switch to "split" my connections from the 1 wire I get ?[/quote']

This should not be necessary, you should be able to accomplish all of this with the router.

Link to comment
Share on other sites

Link to post
Share on other sites

So I did it my way with the switch (couldn't think up a way to get 2 ip's into one port), and it kinda works. When I enable one interface everything is fine, when i enable the other everything goes down and does not work with the other one as well. This should work with the same ISP right ?

Something wrong with your connection ?

Run the damn cable :)

Link to comment
Share on other sites

Link to post
Share on other sites

Switch the router with the switch.

Link to comment
Share on other sites

Link to post
Share on other sites

The switch is infront of the router for a purpose (splitting up the ethernet cable into 2 so I can assign 2 different interfaces on a router for different ip's). It works now, forgot to set a masquerade for the other port :D. But when checking which IP I am connecting through it still shows that i'm using 1 ip for all connections even the server.

Something wrong with your connection ?

Run the damn cable :)

Link to comment
Share on other sites

Link to post
Share on other sites

The switch is infront of the router for a purpose (splitting up the ethernet cable into 2 so I can assign 2 different interfaces on a router for different ip's). It works now' date=' forgot to set a masquerade for the other port :D. But when checking which IP I am connecting through it still shows that i'm using 1 ip for all connections even the server.[/quote']

So what exactly is the reason for having the switch in front of the router? I do understand taking the two ISP lines and combining them into one, but you don't need to do this. You could have plugged everything directly into the router, and with a bit more configuration got what you desired.

Link to comment
Share on other sites

Link to post
Share on other sites

You don't understand, I am getting one ethernet cable then using it to split up that cable into 2 cables which go into the separate interfaces for the 2 different IP's. But thats not the point, I am not sure if this works with the same ISP. I need to put the server behind one ip and the clients behind the other.

Something wrong with your connection ?

Run the damn cable :)

Link to comment
Share on other sites

Link to post
Share on other sites

Can you subnet one of the IP for the two networks?

Could you go into a little more detail than that?

Link to comment
Share on other sites

Link to post
Share on other sites

Can you subnet one of the IP for the two networks?
Could you go into a little more detail than that?

I'm assuming he has a static ip address, so with that address he subnets the address to into two networks and uses that to separate server and clients. For example, if he has static address 199.0.0.0/24, he subnets that into 199.0.0.0/25 and 199.0.0.128/25. Then, he can assign the server to 199.0.0.2/25 and the ethernet port of the router to 199.0.0.1/25 and save 199.0.0.128/25 for the clients. This only works if the router he is using supports it and if the IP address is static.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×