New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Use Bubba as webserver for my dns domain.

A collection of tips on howto tweak your Bubba.
rygkri
Posts: 3
Joined: 01 Jun 2011, 08:39

Use Bubba as webserver for my dns domain.

Post by rygkri »

Hi.

I wanna use my Bubba2 as a webserver for a domain I bought.

Now I am using firefox to access my Bubba2 since my operating system is windows.
I am jusing bubba as a wireless router and got i conected to my squeezebox wich works fine.

Question. Can I use Bubba2 as a webserver.
What program do i need to install on it ? and how do I do it?
Do I need a linux operating system to accsess my bubba proberly?

Hope someone got a good fix for my challenge.

Best regards,
Kristian
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Use Bubba as webserver for my dns domain.

Post by Ubi »

Hi

All the software you need is installed already, and in fact your bubba already is a web server! Some knowledge of the webserver software (apache) is helpful, but is freely available on the web.

To access your bubba from windows all you need is PuTTY (http://www.putty.org/)
RandomUsername
Posts: 904
Joined: 09 Oct 2009, 18:49

Re: Use Bubba as webserver for my dns domain.

Post by RandomUsername »

To add a little more to Ubi's post.

Anything you save on your server in /home/web/<folder> will be accessible through the web at yourdomain.com/folder.

To point the domain you own to your B2 might be a little more complicated. You might need to set up a dynamic DNS service if you don't have a static IP address. You need to edit the DNS records of your domain to point to your IP address. My own preference for doing this is with zonedit.com but YMMV.
rygkri
Posts: 3
Joined: 01 Jun 2011, 08:39

Re: Use Bubba as webserver for my dns domain.

Post by rygkri »

Thank you for your answers, I have some more questions.

I have now downloaded putty, but can`t get i contact with my bubba server.
What conection type should I use SSH or telnet or other?
..and what port?
Do I use host name or IP?
What user should I log on with ? admin?

One question regarding zoneedit, do I have to use this or a simular program to get in contact with my domain since I don`t have static IP ?

Until my homepage is looking at least semipro, I don`t need it to be accsesible to the public.

Have a good day,
Kristian.
Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: Use Bubba as webserver for my dns domain.

Post by Cheeseboy »

Hi,

First check if you can ping your bubba by name.
From the windows command prompt:

Code: Select all

ping bubba
If it succeeds you should be able to access the bubba via putty by name. If not, you have to use the IP address.

Log in with the web interface as admin and create a user. Check the "Shell login" checkbox.
Now you can connect to the bubba with putty with that username.
Use the default port (22).

You are going to need something to update the DNS when your IP changes.
I use a service from dyndns.com and a program called ddclient that automatically detects changes of the IP and updates the DNS. There are other such solutions out there...

Best regards,

Cheeseboy
Last edited by Cheeseboy on 11 Jun 2011, 16:46, edited 1 time in total.
RandomUsername
Posts: 904
Joined: 09 Oct 2009, 18:49

Re: Use Bubba as webserver for my dns domain.

Post by RandomUsername »

I may be wrong, but if you want to use dyndns with your own domain you have to pay. With zoneedit.com this is free. You also use ddclient to update zonedit. I will post my config when I am next at my PC.
Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: Use Bubba as webserver for my dns domain.

Post by Cheeseboy »

You are right, I pay them a fee...
rygkri
Posts: 3
Joined: 01 Jun 2011, 08:39

Re: Use Bubba as webserver for my dns domain.

Post by rygkri »

Things takes time...

I`ve tried using zoneedit to edit my dns record of my domain to point to my dynamic ip address..
Doesn`t work, anyone have an example of the configuration?

Also, will my bubaserver be an easier target for hackers if i use it as a webserver?
I have pictures, movies and music on my bubba etc on it.
What can I do to improve the security?

Have a nice day.
RandomUsername
Posts: 904
Joined: 09 Oct 2009, 18:49

Re: Use Bubba as webserver for my dns domain.

Post by RandomUsername »

Code: Select all

server=dynamic.zoneedit.com,           \
protocol=zoneedit1,                    \
login=username,                  \
password=password        \
domain.com
This is the zoneedit section from my ddclient.conf. I'm still on the legacy product though, I don't if it will be different for newer zoneedit accounts.

Regarding security, of course you're exposing yourself more. However, Linux in general is pretty secure. Things you can do - don't install something like phpmyadmin and expose it to the web, force https when connecting to the server (there's a post somewhere about that), use strong passwords, don't publicise your URL too much. Whatever you do though, you're bound to see some hacking attempts. I get a daily summary of my logs with logwatch and I'm always seeing people trying to access phpmyadmin on my server.
Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: Use Bubba as webserver for my dns domain.

Post by Cheeseboy »

I have not used ZoneEdit, but when I decided to drop the firm I originally registered my domain with in favour of DynDNS, I had to get the original firm to hand over control of my domain name to DynDNS, or they would not have the right to change it on my behest.

There is also a setting called TTL ("Time To Live", I think), which controls the amount of time all the other DNSes out there will cache your name/address mapping before looking it up again. Set it to a high value for faster every-day operations, and a lower value for faster reflection of changes. In the DynDNS provider, this is set in their web interface, not in the ddclient configuration. Don't know how it works with ZoneEdit.

As of security, install and configure the denyhosts package to block SSH attacks (there are quite a lot of them, it has added 3624 entries to my /etc/hosts.deny in one year).

As RandomUsername wrote, keep any admin web interfaces private.
Here is an example from my /etc/apache2/apache2.conf, it will block all access to vnstat that is not originating from the internal network:

Code: Select all

<Directory "/home/web/vnstat">
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 192.168.10.0/24
        Allow from 127.0.0.1
</Directory>
Another thing is to make sure that you do not access the web interface from outside with a username that has SSH access, unless you do it over a HTTPS connection, as the password is sent in clear text over standard HTTP.
flexor
Posts: 5
Joined: 10 Jan 2012, 09:01
Location: London, England

Re: Use Bubba as webserver for my dns domain.

Post by flexor »

I'm hosting a number of websites on my Apache server at home. You need to use virtual hosts if you're going to serve up different websites to different URLs. If you just want your excito GUI on the Internet, then ignore this.

What you need to do to have your bubba serve a website is:

1. Register the domain somewhere.
2. Have the domain point to the outer address of your firewall.
3. Configure your firewall to send requests on ports 80 and 443 (if you're into HTTPS) to your bubba.
4. Create a virtual host in Apache for the content you want to store
5. Put the desired content on your bubba in the designated spot.

Points 1, 2 and 3, I don't know how to do because they depend on your setup.

Point 4: This is a virtual host configuration file:

Code: Select all

# Example virtual host configuration file
#----------------------------------------------------------------------

<VirtualHost *>
        ServerName  www.example.co.uk
        ServerAdmin webmaster@example.co.uk

        DocumentRoot /data/www/www.example.co.uk
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /data/www/www.example.co.uk>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /opt/apache2/cgi-bin/
        <Directory "/opt/apache2/cgi-bin">
                AllowOverride None
                Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/example_error.log
        LogLevel warn

        CustomLog /var/log/apache2/example_access.log combined
        ServerSignature On

</VirtualHost>
You put it in /etc/apache2/sites-available, then make a symbolic link to /etc/apache2/sites-enabled, called 001-example or some such. You need to substitute your server's name for http://www.example.co.uk, and change a few path names to correspond to where you have your stuff. When Apache receives a request for http://www.example.co.uk/, it'll know to use this file.

5. That's where the fun starts!
Gordon
Posts: 1461
Joined: 10 Aug 2011, 03:18

Re: Use Bubba as webserver for my dns domain.

Post by Gordon »

flexor wrote:You put it in /etc/apache2/sites-available, then make a symbolic link to /etc/apache2/sites-enabled, called 001-example or some such.
Some explanation here might be in order. The reason to prepend a number (001) is that the load order is important. Apache will load the individual files in an include folder in natural order and when evaluating a web request use this same sequence to find a webroot that will serve this request. You will want to have a default host definition (i.e. with no ServerName) declared, but this should always be the last one loaded to prevent it from serving a request for one of your named hosts (in the given example: 999).

Current versions of Apache might behave somewhat different in this aspect, which may also be not so reliable. Reason is a new development that allows hostname negotiation also on https where before you could only have one on a single IP. The problem is that the client (web browser) also needs to recognize this new protocol, so in this case the first site loaded becomes the default site for "old" browsers. To me it doesn't seem all that stable yet, but anyone interested should really judge for themselves.
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Use Bubba as webserver for my dns domain.

Post by Ubi »

Sorry Gordon, but you're using old info again. Apache 2+ uses the first defined virtualhost as the default. That is why the first virtualhost is described in httpd.conf, prior to the Include statement, to be sure this defined host is the primary one. This behaviour, btw, has nothing to do with the experimental virtualisation of https traffic.
Gordon
Posts: 1461
Joined: 10 Aug 2011, 03:18

Re: Use Bubba as webserver for my dns domain.

Post by Gordon »

Ubi wrote:Sorry Gordon, but you're using old info again. Apache 2+ uses the first defined virtualhost as the default. That is why the first virtualhost is described in httpd.conf, prior to the Include statement, to be sure this defined host is the primary one. This behaviour, btw, has nothing to do with the experimental virtualisation of https traffic.
Could be right; Apache2 actually ships with a configuration example that declares a 00-default vhost. One can mix up stuff when in daily life still needing to support old setups as well. :roll:

But it really makes no big difference - if you see the wrong page when accessing the server with a address that does not match a named vhost in your configuration (i.e. the numeric IP address or something-something-dsl.your-isp.com), just change the number on what should be the default site so that it ends up on the other end of the chain. Just remember that without the numbers you can quickly mess up and visitors will see what they shouldn't see.
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Use Bubba as webserver for my dns domain.

Post by Ubi »

interesting, I've never seen apache ship with numbered vhosts.
But instead of the emperical way, just enter

Code: Select all

apachectl -S
and apache will tell you what the default is.
Post Reply