What's new

[DIY] - SmallNetworks - Learning by Doing

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

sfx2000, thanks again for providing these posts and short tutorials to us and the world. I'll be sure to remember they are here if I'm in need of them for my customers.

Thanks for the kind comments - There is a method to the madness - frustrating perhaps for some, but when it's all put together - it'll blow a few minds, and make them ask why they're paying 300/400/500 dollars for a consumer grade router/AP, and we can do more with much less...

more flexibility, more capability, more security...
 
Sfx,

By following your tutorials and guidance, I´ve succeeded to install and auto-run the following services:

Samba
SSH
VNCServer

When I check the services with the "systemctl status <service>" command, the SSH and VNCServer services seems working while the Samba service reports to be inactive. However, Samba is working just fine, I can mount the share in Finder on my MacBook and access the shared directory on Ubuntu. Any thoughts on why "systemctl status" reports Samba to be inactive?

Ole
systemctl status.png
 
When I check the services with the "systemctl status <service>" command, the SSH and VNCServer services seems working while the Samba service reports to be inactive. However, Samba is working just fine

So with the writeup on samba, regarding @oletuv comment

Code:
sfx@raspy:~$ sudo systemctl status samba
● samba.service
  Loaded: masked (/dev/null; bad)
  Active: inactive (dead)

This is definitely something I need to sort out with systemd at some point, but sysv init is launching the samba, so all is good...

I suspect it's a unit definition to tell systemd that Samba is there...
 
Last edited:
Getting close - not quite done - cacti is proving to be a bit of a challenge to do a walk-thru as a guided tour - I use it quite a bit, but that years of experience, and having to see things from a new perspective without sitting next to someone saying click this and why...

Screen Shot 2016-05-17 at 12.31.57 AM.png
 
Last edited:
Been doing most of the docs here on a small box - interesting what a bad CAT5 cable can do... see the Netgate and Turbo data... both are on the same switch - swapped the cable...

(both ends clipped off and put into the eWaste bucket)

badcable_snd_lbd.png
 
Part 1 of 2 for remote access - this is ssh, part 2 of 2 is vnc

Code:
===== install/configure ssh =====

Let's sort ssh - we have lots of space, so let's use OpenSSH vs Dropbear

ssh back into the box - for me, I'm on a Mac, but remember I mentioned MobaXTerm - now's time to consider that if your Windows oriented... otherwise, putty also works fine for Windows

  ssh <username>@hostname.local

or

  ssh <username>@hostip

Note - Ubuntu has avahi installed - and mDNS is awesome... Win10 has mDNS, and iTunes installs mDNS/Bonjour for older versions of Windows - if avahi isn't working, then install it

  sudo apt-get install avahi-daemon

You'll appreciate this later... now tweaking the ssh...

  cd /etc/ssh

Note - most of the defaults are fine, so we'll hit the high points

edit the /etc/sshd_config - save a copy first -

  sudo cp sshd_config sshd_config.bak

and then

  sudo nano /etc/ssh/sshd_config

edit/change the following:

  LogLevel VERBOSE
  LoginGraceTime 30
  PermitRootLogin no
  MaxAuthTries 3
  X11Forwarding no
  MaxStartups 2:30:10

add this line - this makes it so that only one person can login to SSH - <username> is the account you set up installing linux in the first place, and the one you're generally working with

  AllowUsers <username>

Save changes - restart ssh keep current session open

  sudo service ssh restart

Try to login to the ssh server again - should work, if not, check your edits...
Sfx,

I followed the SSH guidance on a fresh Ubuntu 16.04 install in VirtualBox (just for the purpose of practicing). Before saving a copy of and editing the "sshd_config" file I checked the /etc/ssh directory and only found the "ssh_config" file, which I believe is the configuration file for SSH client. I needed to install SSH Server by executing the "sudo apt-get install openssh-server" command, after which the "sshd_config" server configuration file was present in the /etc/ssh directory and I edited it according to your guidance. SSH is working well and auto-starting when Ubuntu boots up.

I´m not sure if there was something weird with my Ubuntu Desktop install in Parallels, but I just wanted to give this feedback/information.

Ole
 
I followed the SSH guidance on a fresh Ubuntu 16.04 install in VirtualBox (just for the purpose of practicing). Before saving a copy of and editing the "sshd_config" file I checked the /etc/ssh directory and only found the "ssh_config" file, which I believe is the configuration file for SSH client. I needed to install SSH Server by executing the "sudo apt-get install openssh-server" command, after which the "sshd_config" server configuration file was present in the /etc/ssh directory and I edited it according to your guidance. SSH is working well and auto-starting when Ubuntu boots up.

You are correct...

ssh_config - this is the client config file where one can add particular options as needed
sshd_config - this is the config file for the openssh-server daemon - with Ubuntu Desktop, one has to add the openssh-server package, which adds the sshd_conf file, along with the daemon and the systemctl entry to launch at start

Nice to be running in a VM - as you can make a snapshot before making changes, and then if it doesn't work, you can go back to a working config. Very smart move. ;)

Probably 75 percent of what I'm working with while doing these writeups in in VMWare Workstation rather than on bare metal - I've got a couple of lower end units to make sure things work well enough - a RaspPI 2 for example, can do most of it, but there will be a couple of sections where it's not optimal.
 
You are correct...

ssh_config - this is the client config file where one can add particular options as needed
sshd_config - this is the config file for the openssh-server daemon - with Ubuntu Desktop, one has to add the openssh-server package, which adds the sshd_conf file, along with the daemon and the systemctl entry to launch at start
Thanks for confirming. The ssh and samba services both work flawlessly now in my Ubuntu Desktop VM.
Nice to be running in a VM - as you can make a snapshot before making changes, and then if it doesn't work, you can go back to a working config. Very smart move. ;)
Absolutely, I currently have Ubuntu Desktop and Windows 10 Pro running in Parallels Desktop 11 and pfSense 2.3.2-DEVELOPMENT running in VirtualBox on my MacBook Pro.:)

Ole
 
++ Broadband

menu = Broadband
title = Broadband
host = 192.168.100.1

I don´t get any values in the graph here. What IP address should I put in this section?

++ SNB LBD Host

menu = SNB LBD Host
title = SNB LBD Host
host = hostname.local
I´m getting an "ERROR: /etc/smokeping/config.d/Targets, line 33: unknown section 'SNB LBD Host'" error. Fixed it by changing "++ SNB LBD Host" to "++ SNB-LBD-Host".

I suppose that "hostname.local" is the hostname of my Ubuntu server, e.g. "Parallels-Ubuntu.local"?

Ole
 
I don´t get any values in the graph here. What IP address should I put in this section?

Put the IP of the device on the WAN port of your Router/AP - 192.168.100.1 is commonly used for cable modems, but it can be any IP address

I´m getting an "ERROR: /etc/smokeping/config.d/Targets, line 33: unknown section 'SNB LBD Host'" error. Fixed it by changing "++ SNB LBD Host" to "++ SNB-LBD-Host".

I suppose that "hostname.local" is the hostname of my Ubuntu server, e.g. "Parallels-Ubuntu.local"?

Ole

hostname.local is a placeholder/example using mDNSResponder (e.g. Avahi), should be whatever the machine's name is - e.g Parellels-Ububtu.local is good if that is what the name is, otherwise can be an IP address
 
This all started as a loose collection of various notes I've gathered over the years...

As I've reviewed them, and prepped for documentation, there's a fair amount of rewrite to catch up with the current state of art. Some of those notes are over 15 years old... and people wonder why there are so many bugs in consumer Router/AP's.

I will be self-moderating and pulling some sections down (and I have been for a bit) - there's some errors, and some dependencies that if stepped thru in order, they all work.

Something to share though - as I've been verifying things, and putting it to the test - here's the server that's been doing the hard work ;)

Including the Storage Section which includes now LVM show and tell, RAID setup, and an extended SAMBA config...

IMG_1059.JPG
 
I´m getting an 404 error.

The 404 or Not Found error message is an HTTP standard response code indicating that the client was able to communicate with a given server, but the server could not find what was requested.

Try going to http://hostip/phpmyadmin

Check your Apache2 logs - /var/log/apache2/error.log and /var/log/apache2/access.log along with /var/log/syslog
 
The 404 or Not Found error message is an HTTP standard response code indicating that the client was able to communicate with a given server, but the server could not find what was requested.

Yes, I know. All the other stuff works, except for phpmyadmin.


hostname = Parallels-Ubuntu
hostip = 192.168.10.15

http://parallels-ubuntu.local/ and http://192.168.10.15/ returns the default page.
http://parallels-ubuntu.local/lbd/index.html and http://192.168.10.15/lbd/index.html returns the "Blue Pill " page. :D
http://parallels-ubuntu.local/dokuwiki/install.php and http://192.168.10.15/dokuwiki/install.php returns the "DokuWiki Installer" page.
http://parallels-ubuntu.local/phpmyadmin and http://192.168.10.15/phpmyadmin returns the 404 "The requested URL /phpmyadmin was not found on this server" error message.

Check your Apache2 logs - /var/log/apache2/error.log and /var/log/apache2/access.log along with /var/log/syslog

In /var/log/apache2/access.log:
192.168.10.157 - - [20/May/2016:09:20:22 +0200] "GET /phpmyadmin HTTP/1.1" 404 504 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/601.6.17 (KHTML, like Gecko) Version/9.1.1 Safari/601.6.17"

I´m pretty much stuck here. I´ve followed the steps/instructions in your excellent tutorial exactly, even reinstalled phpmyadmin a second time. I´m not sure what else to look for.

Anyhow, thank you so much for your contributions/tutorials in this thread. I enjoy this stuff a lot!

Kind regards,
Ole
 
I´m pretty much stuck here. I´ve followed the steps/instructions in your excellent tutorial exactly, even reinstalled phpmyadmin a second time. I´m not sure what else to look for.

When installing from apt, you get a screen that asks which http server is being used..

When that first prompt appears, apache2 is highlighted, but not selected.

If you do not hit Space to select Apache, the installer will not move the necessary files during installation. Hit Space, Tab, and then Enter to select Apache.
 
When installing from apt, you get a screen that asks which http server is being used..

When that first prompt appears, apache2 is highlighted, but not selected.

If you do not hit Space to select Apache, the installer will not move the necessary files during installation. Hit Space, Tab, and then Enter to select Apache.
Sfx,

You are a genius! Thanks for your patience and for bearing over with me! That was it, phpmyadmin running flawlessly now. :)

Ole
phpmyadmin.png
 
Sfx,

I just noticed that you´ve pulled most of the tutorials. I know that you´re self-moderating this thread, so I hope your excellent tutorials will reappear soon. I like to redo these exercises several times for practicing and learning.
 
Sfx,

I just noticed that you´ve pulled most of the tutorials. I know that you´re self-moderating this thread, so I hope your excellent tutorials will reappear soon. I like to redo these exercises several times for practicing and learning.

Yeah, as I've been reviewing them, they were a bit disconnected from each other - when done, I'll repost, in DokuWiki markup, so if you have DokuWiki installed, you can put them straight into your own DokuWiki and you'll have a long term copy ;)
 
Yeah, as I've been reviewing them, they were a bit disconnected from each other - when done, I'll repost, in DokuWiki markup, so if you have DokuWiki installed, you can put them straight into your own DokuWiki and you'll have a long term copy ;)

SFX, I am confused by a couple of your previous edits where you state a post is reposted. I cannot find them at all. Am I missing something?

I have been following your thread and recently purchased a Rasberry Pi 3B looking forward to following along. -Thanks.
 
SFX, I am confused by a couple of your previous edits where you state a post is reposted. I cannot find them at all. Am I missing something?

I have been following your thread and recently purchased a Rasberry Pi 3B looking forward to following along. -Thanks.

Please accept my apologies - as I was reviewing some of the sections, I found a few errors, and a lot of assumptions on my part about what the skill levels may be, so some of them, or at least some of the steps were a bit difficult.

I'm well into the rewrite - the storage section alone now is nearly 15 pages long - and is currently in a peer review with a couple of folks (helps to have another set of eyes to see inconsistencies and editorial errors)

All in all, the entire doc set is likely going to be 50 to 60 pages in length.

So be patient - the info will start flowing again soon - if not as posts inside the forum, I will make the information available again.
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top