Zentyal Forum, Linux Small Business Server

Zentyal Server => Installation and Upgrades => Topic started by: lonthong2002 on December 26, 2007, 07:29:17 pm

Title: (ASK)How to set gateway if input internet is DHCP
Post by: lonthong2002 on December 26, 2007, 07:29:17 pm
I already test my Ebox with static ip for input internet...everything is workin normal...(except proxy problem)
now i try use DHCP config for input internet ( not use Ebox for dhcp server) but...input internet is dynamic ip ( not static)

i can,t set default gateway...because dhcp server is automatic config...:D

thanks for help...

Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: tumba on December 26, 2007, 09:40:32 pm
I have the same problem, I put a router between internet and de ebox, but I can`t do it in a direct way.
any one knows how????
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: lonthong2002 on December 27, 2007, 04:25:08 am
Let us wait Mr administrator solve this problem....:D
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: jabastien on July 01, 2008, 06:20:16 am
I already test my Ebox with static ip for input internet...everything is workin normal...(except proxy problem)
now i try use DHCP config for input internet ( not use Ebox for dhcp server) but...input internet is dynamic ip ( not static)

i can,t set default gateway...because dhcp server is automatic config...:D

thanks for help...

administrator,

I have the same problem. My eBox is between a Wireless router (configured as wireless client) and a hub. I have the AP set to dynamicaly provice a fix ip to the eBox eth0. How can I set eth0 as gateway?
I searched the entire forum for a solution. Is this still unresolved?

Thank you.
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: javi on July 06, 2008, 09:20:18 pm
Sorry guys, we don't support this yet. There's a workaround though to bypass the check eBox does to see if the router is reachable. That's the problem as the interface is configured by dhcp, eBox doesn't know the assigned IP so when it checks to see if it's reacheable it complains.

If you want I can tell you what lines you have to change to bypass this.
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: jabastien on July 08, 2008, 07:51:24 pm
Hello Javi,

Yes, I would like that piece of information. I'm willing to modify the code for that functionality.
It would be helpful to add a comment in the code just incase the module is changed after an update.

Thanks in advance,
Jabastien
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: homer on August 20, 2008, 01:47:38 pm
Here's another guy asking for this, and not afraid to look at the code.

Having a cable modem (not a router) is a big reason to use eBox, and it's a big pity it can not handle gateways with dynamic IP. Nowadays most cable companies install that type of modem, and if you want to share the connection you only have 4 alternatives:

   a) buy an extra hardware router

   b) install IPCop or Smothwall on a spare PC

but if you want to use the router pc for another tasks, or you want a direct (not NATed) connection:

   c) take a degree in network protocols and mess with ipchains and all that

   d) ask eBox team to (or how-to) fix that stupid bug in overchecking the gw input


It's a big pity a few lines of code keep so many people away from that great software.
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: javi on August 29, 2008, 10:45:47 am
Guys let me know if this is your issue:

You have a network interface that is configured via DHCP but the DHCP server is not giving you a default gateway and you want to set it manually?

Sorry for not getting back to you earlier but I've been pretty busy with the new eBox release. Now I'm done with that, the window for new stuff is open, so feel free to ask :)
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: gestahlt on September 25, 2008, 08:00:22 am
I suffer from the same issue.

I have a cablemodem which is connected to the NIC directly.
There is no way to setup a working static configuration.
I want to use my ubuntu box (with ebox as frontend) as a router.
Is that issue fixed or a workaround possible?
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: Ariel Antigua on February 09, 2009, 03:19:09 pm
 Looks like all the poster solved the problem or what?

last night i installed ebox to set up a dual wan gateway and found the same problem. no gateway if WAN is a DHCP client.

Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: histerix on April 08, 2009, 02:54:14 am
Guys let me know if this is your issue:

You have a network interface that is configured via DHCP but the DHCP server is not giving you a default gateway and you want to set it manually?

Sorry for not getting back to you earlier but I've been pretty busy with the new eBox release. Now I'm done with that, the window for new stuff is open, so feel free to ask :)

I'm also stuck with that situation...

I have a cable modem that gives my NIC a dynamic IP over DHCP...
I would like to setup my eBox as a router (wireless and wired) and forward the Internet to the rest of my house...

Could You please give us the workaround?

Thanks in advance :)
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: javi on April 10, 2009, 02:07:21 pm
What's the problem exactly?
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: Sam Graf on April 10, 2009, 03:17:06 pm
I have a cable modem that gives my NIC a dynamic IP over DHCP...
I would like to setup my eBox as a router (wireless and wired) and forward the Internet to the rest of my house...
This is possible without workarounds. I have two stock eBox 1.0 installations serving as routers for DSL connections. In one case I serve wirelessly with a WAP.

You have to have a minimum of two NICs installed to use an eBox as a router. One NIC is connected to the modem and designated as an external interface. That interface can use DHCP to get its address. The other can be managed by eBox's DHCP service and can be plugged into a switch. I don't know if a wireless card can be used to route wireless traffic (never tried), but as I mentioned, a WAP will work.
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: phat on August 10, 2009, 09:03:47 pm
Same here :( Still no solution?
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: poundjd on August 11, 2009, 02:53:15 pm
Ok, I'm sourt of confussed,  I have a cable connection, my External IP is assigned by the Cable company using DHCP, and I assigne addresses in the House via DHCP to include all the DNS stuff.  My internal DHCP server assignes the the my internal IP of my gatway to all the internal IP's as both the Primary DNS, and Gateway.  It all works fine.  If I was not doing DHCP from the gateway box then that may be an issue.

So you guys with this problem are not useing the eBox as your Network Gateway? or you Not useing it to assigne IP via DHCP?

If that is the case then you have to manually input your DNS and Gateway in to your DHCP Server, or your systems directily.  My cable IP changes about once to twice a year, so if your's is similar then the work is not too bad.  I have over 20 systems in the house and use DHCP so that I don't go crazy....
-jeff
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: phat on August 11, 2009, 03:14:26 pm
The topic itself states it very clear "How to set a gateway if INPUT INTERNET is DHCP".

This has nothing to do with internal DHCP on LAN. This is on the WAN side to cable modems or whatever you have.

I have for the moment given up on fixing this properly and done a quickfix setting the iface to static :\

See also my other post for details:
http://forum.ebox-platform.com/index.php?topic=1730.0


Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: Sam Graf on August 11, 2009, 04:15:54 pm
Jeff's confusion is justified if for no other reason than he is using a DHCP-assigned IP on the WAN side, something you seem to be insisting doesn't work. As mentioned in this very topic, I've successfully used eBox (both release versions now) with my external interface's IP assigned via DHCP. I've also used it with a static IP.

So your "Still no solution?" post is in fact confusing to at least some, since it's not clear to me (and apparently not to Jeff) just what solution to what problem is needed.

That said, load balancing (per your other topic) is different from what I think this topic addresses. In that case, you're right that a gateway cannot be assigned to a non-static interface. That conversation can be pursued best in your other topic, I think, to avoid the potential for more confusion.
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: gpouser on August 11, 2009, 04:35:22 pm
You need to check how DHCP is given by your ISP, for VM - (NTL) the internet is registered against the MAC address of the PC that you use at first sign on that is with a SET TOP BOX, if you have a cable modem then there maybe no problem. I use to use IPCop but with a PCI network card that way you can assign it to VM in a Windows XP client then remove the card and place it in your system box (eBox)



Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: phat on August 13, 2009, 09:37:14 pm
This is the case:

(http://home.broadpark.no/~mbornes/ebox_dchp_gateway.jpg)

What part of this is unclear?

Edit: Read the first 2-3 post of this thread, I've just re-read them and its the same.
But okay, so there is no way to bypass this check? Cause the gateway obtained from dhcp server is and will always be the same. It's just the client IP leased that changes...

Sorry guys, we don't support this yet. There's a workaround though to bypass the check eBox does to see if the router is reachable. That's the problem as the interface is configured by dhcp, eBox doesn't know the assigned IP so when it checks to see if it's reacheable it complains.

If you want I can tell you what lines you have to change to bypass this.

Javi, can you please provide this workaround? If you do I'll donate :)
Title: DIRTY SOLUTION :P
Post by: phat on August 13, 2009, 11:06:30 pm
Okay, I found a dirty solution that worked for me, atleast until someone comes up with a better one;

Edit /usr/share/perl5/EBox/Network/Model/GatewayTable.pm

Uncomment (put an # in front)
Code: [Select]
$network->gatewayReachable($params{'ip'}, 'LaunchException');
Downside is that it doesn't check the IP entered at all, but I can live with that for now :)
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: Raddy on August 18, 2009, 01:13:31 am
I used the workaround, but when I configure the gateway, I still get an error saying:
Code: [Select]
An error happened trying to set the default gateway. Make sure the gateway you specified is reachable.

I set up the external NIC (eth0) as a gateway and entered the IP address currently assigned by my ISP.  Where do I go from here?
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: sixstone on August 20, 2009, 09:43:07 am
We are currently working on DHCP-based WAN interfaces. We hope to get rid of these problems soon.

Sorry for any inconvenience and thanks very much for using eBox platform,
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: aguerra on September 03, 2009, 04:09:23 pm
We have the same problem in the new instalations .... How I can fix this problem?
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: dragonslayr on September 05, 2009, 08:50:10 am
So you guys made me curious whether an ip alias would work.
ifconfig eth0:0 192.168.1.11 up

The plan was to set that static address. It should have worked but..

The short story is no, after I entered the alias interface into the ebox config. eth0:0, it blew up..   hehe

I had to clear iptables to get networking to work again..
Commands to clear are below in case you guys get any bright ideas as well..

iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: tekoholic on December 26, 2009, 05:32:01 pm
Wow, has this issue REALLY not been addressed since September?

My apologies...  I'm a new potential user / partner, testing eBox installed on Karmic (will stick with Lucid LTS, once in beta).

I've spent nearly 2 years bouncing back and forth between pfSense and ZeroShell, neither of which offer quite what I need, nor what my customers will need / desire.  I must say, I am AMAZED at the lack of support for this, as well as the lack of support for PPPoE...

I am STUCK WITH KARMIC, due to hardware support, so responses such as, "...stick with what we support..." are not welcome.  My OS has NOTHING TO DO with either of these issues, as well exhibited in these forums...

DHCP and PPPoE are both technologies that are as old as the first consumer high-speed connections.  How is it that they can be so badly neglected by a system claiming to be an all-in-one networking solution?
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: J. A. Calvo on December 27, 2009, 03:09:58 pm
As jsalamero replied you in this post (http://forum.ebox-platform.com/index.php?topic=2503.msg10857#msg10857):

Quote
We want eBox to be solid like a rock and new features need to be well designed, coded and tested. Things like DHCP are full of dark use corners that need to be addressed to get the things work.

I don't have much more to add. We have a lot of stuff to do and we work as fast as we can. We always try to have asap the functionalities most demanded for small bussiness, that is our main target. How many small business need multi-wan dhcp? We have only had a very few requests. Anyway, we are going to implement it, it's one of our priorities right now. Also take intou account that our releases are each six months (like Ubuntu ones), there hasn't been any new official release since September, so please be patient. Some times things are more harder than they look.
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: tekoholic on December 27, 2009, 08:34:33 pm
Understood.  So, what can I do to help?  I apologize, but the needs are there.  I support clients RIGHT NOW, residential and business, that need what this project could be...
Title: Re: (ASK)How to set gateway if input internet is DHCP
Post by: jsalamero on December 27, 2009, 09:22:33 pm
eBox Platform is an open source project, so you can contribute and speed up features in many ways:

- providing patches to the current modules to implement the features you want.

- if you don't have development skills, you still can contribute with working configurations or working setups well documented that the developers could easily merge in the modules adding the needed code, helps a lot having a well tested configuration that works.

- of course, documentation on eBox itself, tips, translations and testing is a very good way to contribute the project.

but this project is sponsored by a company called eBox Technologies, that offers custom development, training, support and other services for eBox Platform, see http://www.ebox-technologies.com/.

if you need a feature, you can't wait and you want to speed up things, maybe you should contact comercial staff and agree with them how to sponsor the development of what you need. even more, if you are giving support to your clients, you can get 3rd level support from eBox Technologies.