Link to home
Start Free TrialLog in
Avatar of recsx
recsx

asked on

How to assign public ip's using dhcpd on mandrake

I have a server running mandrake 8.2
my connection is a fiber optic connection from my local hydro company.
I get no email no service at all with this service its wide open to the world
with no blocked ports and no cap its a commercial service.

So i decided to start a wireless ISP with it i have knowledge of private networking
but not much on public networking.

I've been allocated public ip's from x.x.x.226 to 238
my system has two network cards eth0 has address x.x.x.226 which has the fiber connected
directly to it, then i have eth1 with address 192.168.0.1 connected to a switch hub.

This is where i have (for now) one system connected directly to that switch and one wireless access
point connected to (I only have one client and one access point for now till i do test and have it working).

What i would like to do is use DHCP on the mandrake system to allocate my range of PUBLIC! ip address's to clients rather then dumb ass private ip's like 192.168.x.x

I've been seaching the net for weeks no about dhcp and i've even read the entire handbook on dhcp
and man i'm gettin frustrated, anything reffered to in the documents always reffers to private ip's

Can some help with this problem?

Thank you in advanced.
Avatar of TheAmigo
TheAmigo

What you're trying to do is very difficult.  First problem is if you assign those IPs to machines behind your firewall, it will be confused because IPs that should be on the same subnet are on both sides of it.

The next challenge is that a client with one of your IPs (e.g. x.x.x.227) won't want to pass packets to a router with IP 192.168.0.1 because that's a different subnet.

To get around those problems, you'll want to have x.x.x.226/29 show up inside your firewall.  The first thing that comes to mind is to setup another router that's a mirror-image of your existing one:

routerB would have eth1 with IP 192.168.0.2 and be connected to your existing box.  Then assign its eth0 to be x.x.x.227 and be connected to your other clients (x.x.x.228, etc).  Set its default router to 192.168.0.1

The next part is to convince your current router to forward packets for .227 - .236 to routerB.  Since it thinks it's already on this subnet, you'll need to override its default routing table.  Add host specific routing entries for x.x.x.227 - .236 and speicfy 192.168.0.2 as the gateway.

I'd be interested to hear if this works for you.
Avatar of recsx

ASKER

Huh! well i realy dont have to use 192.168.0.1 as my router.

This server is not really suppling any real service to anything at the moment other then the system im using to reply to this forum.

If you have any sugestions on how to configure both nics from scratch to allo me to provide these public ip's i think this would be an easier approach, do you think not?

Avatar of recsx

ASKER

Huh! well i realy dont have to use 192.168.0.1 as my router.

This server is not really suppling any real service to anything at the moment other then the system im using to reply to this forum.

If you have any sugestions on how to configure both nics from scratch to allo me to provide these public ip's i think this would be an easier approach, do you think not?

Normally, you have a subnet of IPs (perhaps a /30) dedicated to the network between two routers.  But I'm guessing you don't have that between you and your ISP.

The easiest way to use all your real IPs is to plug a hub (or switch) into your WAN connection and run your DHCP server on x.x.x.226.

Then packets from your customers go straight to the hydro company and don't even pass through your linux box.
Avatar of recsx

ASKER

Ok thats sounds like it would work
But would i be able to trake traffice and apply rules if i did it this way?
No, you wouldn't be able to filter traffic (inbound or outbound), only sniff it.

My first (complex) suggestion was trying to come up with a way that would let you filter traffic.

If you can get another subnet (only needs to be a /30) that you can use for your WAN link.  And get them to add an entry to their routing table that says your box is the gateway to the other subnet (x.x.x.226/29).  Then you'd be able to setup a standard router.
ASKER CERTIFIED SOLUTION
Avatar of colonytire
colonytire
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of recsx

ASKER

Little vague but ok i think i get the jist of it.

One more question?, when you say router do you mean like a cisco router of some sort?

I'm going to look at a used cisco router tomorow a 2600 series.

Do you think this will do the job?
recsx:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.