Sign in with
Sign up | Sign in
Your question

Using cPanel on a Local Linux Box

Tags:
  • Control Panel
  • Linux
Last response: in Linux/Free BSD
Share
December 12, 2010 1:31:25 AM

I was wondering if there is a way to install cPanel on my local Linux machine. I have a few licenses and I want to do something with them, so I thought I would use them to test out website locally. But I don't want the servers to be accessible by the internet, just on my local network. So is there anyway I can set this up?

More about : cpanel local linux box

December 12, 2010 1:20:48 PM

Firestar said:
I was wondering if there is a way to install cPanel on my local Linux machine. I have a few licenses and I want to do something with them, so I thought I would use them to test out website locally. But I don't want the servers to be accessible by the internet, just on my local network. So is there anyway I can set this up?


If a server has a cable running to the internet, it's safe to assume that it is accessible. The question is "how accessible" So if your server is properly hardened, installing cPanel doesn't really represent a meaningful risk (beyond it's an obvious target sitting on the default port) If your server is not properly hardened you've already got other problems. ;) 
m
0
l
December 12, 2010 5:02:22 PM

I would honestly rather not even have it connected to the Internet.
m
0
l
Related resources
December 12, 2010 5:54:21 PM

Firestar said:
I would honestly rather not even have it connected to the Internet.


Are you going to be using a physically different machine?

The easy answer is indeed, just don't have it plugged into the internet. Not so long ago I had a set up here where there were 2 routers: 1 had a 'web connection, the other did not, and was part of a totally isolated intranet. Of course the major caveat was that to have one network speak to another required physically switching cables. Clearly, the inelegant solution of the desperate and paranoid mind. :lol: 

My (more reasonable) suggestion would be to install something like VirtualBox, and install a guest OS. The default setting in VirtualBox for networking is NAT, so the guest sitting behind the NAT offers some unique security benefits and sits behind your desktop computer's security. You'll need to port-forward all the services you care to use so that your host machine can actually access them. It's a fully functioning OS so you can install cPanel and do whatever development/testing you want. When you don't need it you can just easily turn it off.
m
0
l
a b 5 Linux
December 12, 2010 6:12:28 PM

Or get a router with dd-wrt or similar and set up a seperate vlan for the one without internets ;) 
m
0
l
December 12, 2010 6:57:54 PM

wombat_tg said:
Are you going to be using a physically different machine?

The easy answer is indeed, just don't have it plugged into the internet. Not so long ago I had a set up here where there were 2 routers: 1 had a 'web connection, the other did not, and was part of a totally isolated intranet. Of course the major caveat was that to have one network speak to another required physically switching cables. Clearly, the inelegant solution of the desperate and paranoid mind. :lol: 

My (more reasonable) suggestion would be to install something like VirtualBox, and install a guest OS. The default setting in VirtualBox for networking is NAT, so the guest sitting behind the NAT offers some unique security benefits and sits behind your desktop computer's security. You'll need to port-forward all the services you care to use so that your host machine can actually access them. It's a fully functioning OS so you can install cPanel and do whatever development/testing you want. When you don't need it you can just easily turn it off.

Yes I would be using a separate machine for it, having it has a dedicated development server. I like the intranet idea, I'll look into that. How would I setup the DNS setting in cPanel though? Because it is not connected to the internet I'm not sure how I would set that up.

skittle said:
Or get a router with dd-wrt or similar and set up a seperate vlan for the one without internets ;) 


I have a few routers with that and I will see what I can do with them.
m
0
l
December 12, 2010 7:40:31 PM

Firestar said:
Yes I would be using a separate machine for it, having it has a dedicated development server. I like the intranet idea, I'll look into that. How would I setup the DNS setting in cPanel though? Because it is not connected to the internet I'm not sure how I would set that up.


You could access the server through it's IP address, unless you have a specific reason that you need to use fully-qualified domain names. EG, email. Just grab the IP from ifconfig and you should be able to access it directly through normal network services.

If you need DNS services you would want something like BIND. You can name your domain anything you want since it's your private empire. Ours was named "cheeseburger.lan"

You cannot configure DNS services through cPanel that I am aware of. Maybe there's a module for it? cPanel is more an end-user tool and not an admin type tool. If you want another GUI type interface with that in mind there's webmin (which is free) but frankly, I found it easier to just configure all the various files by hand.
m
0
l
December 18, 2010 12:16:39 AM

wombat_tg said:
You could access the server through it's IP address, unless you have a specific reason that you need to use fully-qualified domain names. EG, email. Just grab the IP from ifconfig and you should be able to access it directly through normal network services.

If you need DNS services you would want something like BIND. You can name your domain anything you want since it's your private empire. Ours was named "cheeseburger.lan"

You cannot configure DNS services through cPanel that I am aware of. Maybe there's a module for it? cPanel is more an end-user tool and not an admin type tool. If you want another GUI type interface with that in mind there's webmin (which is free) but frankly, I found it easier to just configure all the various files by hand.

Yes, I would rather configure it by hand then using some sort of tool. I do need to use a domain name with it. Now I am wondering what do I need to setup so all the computers on that network automatically use this DNS server and can access the domain? Would it be possible to tell the router to use the server for DNS and that way everything would happen automatically?
m
0
l
December 18, 2010 1:29:24 AM

I don't *believe* you can get the router to do that for you, and I'm not sure you would want to even if you could.

It's VERY easy to tell a computer what nameservers they should use.

In Linux you usually have to edit the resolv.conf file (depends on your distro) and restart the network services. There's probably also a way to do it through the GUI, I've always just done it by hand.

In Windows you just go to the network control panel, click "properties" on your active connection, then there's an option to set DNS servers manually. You may or may not have to restart the network. Depends on which version you're using.

m
0
l
December 18, 2010 1:39:48 AM

wombat_tg said:
I don't *believe* you can get the router to do that for you, and I'm not sure you would want to even if you could.

It's VERY easy to tell a computer what nameservers they should use.

In Linux you usually have to edit the resolv.conf file (depends on your distro) and restart the network services. There's probably also a way to do it through the GUI, I've always just done it by hand.

In Windows you just go to the network control panel, click "properties" on your active connection, then there's an option to set DNS servers manually. You may or may not have to restart the network. Depends on which version you're using.

The biggest problem is that it would be tedious to change DNS servers every time I wanted to switch networks, when I need a few computers to quickly switch and test something. Is the problem with the router not being to do it a limitation in options or a hardware limitation? The reason I ask is because I have DD-WRT on a few routers and they have options to choose DNS servers for the network.
m
0
l
December 18, 2010 2:24:45 AM

To be perfectly honest I do not know. It's not something I've ever contemplated doing. vlans are totally outside my realm of experience.

It was my understanding you wanted two totally seperate networks- I have never used a router for this purpose, and perhaps the assumption I'm about to express is incorrect, but I would think not only would you need to swap computers' DNS, but you'd also need to swap them onto the correct vlan for them to see each other.

I'm sure there is a "quick" solution to what you want to do, but it may be a bit of a challenge to set up. Perhaps someone else can chime in and teach us both a lesson. :) 
m
0
l
December 18, 2010 2:44:15 AM

wombat_tg said:
To be perfectly honest I do not know. It's not something I've ever contemplated doing. vlans are totally outside my realm of experience.

It was my understanding you wanted two totally seperate networks- I have never used a router for this purpose, and perhaps the assumption I'm about to express is incorrect, but I would think not only would you need to swap computers' DNS, but you'd also need to swap them onto the correct vlan for them to see each other.

I'm sure there is a "quick" solution to what you want to do, but it may be a bit of a challenge to set up. Perhaps someone else can chime in and teach us both a lesson. :) 

Well it would be on it's own separate network. It would have its own dedicated router, not sharing one. I am going to start work on this tomorrow, so I can see if that will work. If it does. great, If not I'll have to look for another solution.

Thank you so much for your help, I really appreciate it.
m
0
l
!