Author Topic: New Installation, Udev problems.  (Read 2548 times)

poundjd

  • Zen Warrior
  • ***
  • Posts: 243
  • Karma: +0/-0
  • To your own morals be true!
    • View Profile
New Installation, Udev problems.
« on: April 09, 2009, 09:47:42 am »
Hello,
   Well I'm trying to install ebox from the ebox 1.0 install ISO.  Got the OS and ebox modules installed from CD.  Rebooted, and because I have 5 NIC's I checked the /etc/udev/rules.d/70-persistent-net.rules file.  I did not like what I saw and using nano I changed the file, rebooted and ran into troubles galore.  I then reinstalled the screen and keyboard and again using nano fixed the files and rebooted.  I'm exactly back where I started.  So how do I do that now?

(I am generating a log as I go that I plan to become a good through HOWTO, and I'll include that below between the lines.)  it is very very rough right now so please excuse.
_________________________________________________________________________
OK this is where I am going to document the installation of eBox 1.0 in my home network.

Why? The current gateway device does not offer enough flexibility and configuration options to keep my IT savy kids off of the non-school sites during the day.  They keep getting viruses on their systems.

what I have:

A domain registered with eNom Central called MYmailDOMAIN.US, that I'll use for email delivery.

Comcast Cable Modem:
   Domain      hsd1.pa.comcast.net
   IP Address   68.32.x.y 
   Subnet Mask   255.255.255.128 
   Gateway      68.32.x.w 
   DNS       168.87.75.194 
   DNS       268.87.64.146 
   DNS       368.87.72.130


Linksys WRT54G-TM running DD-WRT v24 as my gateway server
   Wan Domain   hsdi.pa.comcast.net
   WAN IP Address   68.32.x.y
   WAN Subnet Mask   255.255.255.128 
   WAN Gateway   68.32.x.w

   Lan Domain   Home.MyMailDomain.US
   LAN Subnet Mask   255.255.255.0
   LAN IP Address   192.168.1.1
   LAN Gateway   192.168.1.1
   LAN DNS      192.168.1.1

 
   
Linksys WRT54G V2 Running DD-WRT V24
Many switches and bridges.
Headless Dell box to run eBox on,
My Main workstation is a Windows VISTA system.
14+ computers

Current Network Configuration:
CABLEMODEM=====>{Linksys WRT54G-TM Running DD-WRT V24}==========={Home Lan}
                {IP DHCP 68.32.x.y from Cable Company}           {IP's DHCPed from DD-WRT}
 


What I want:

Desired network configuration:

CABLEMODEM=====>{NIC0 ->eBox with 5 NICS}=+=nic1===>192.168.1/24 -> DMZ, Servers, and other stuff
                                          |
                                          +=nic2===>192.168.2/23 -> Home & School LAN, 2 Wireless AP's running DD-WRT V24 in ap MODE 
                                          |
                                          +=nic3===>192.168.3/24 -> DEV LAN
                                          |
                                          +=nic3===>192.168.3/24 -> TEST LAN

I want to have the eBox provide all gateway services for my internal networks.

I would like the following services running on eBox: DHCP, Firewall, Web Proxie, NTP Server, eMail, eGroupware


OK with Ubunto there is a process that is used during the install that writes the hardware configuration files.  UDEV.  for Network devices Ubuntu writes out a file that records the hardware networking configuration.

Code: [Select]
poundjd@ebox:/etc/udev/rules.d$ cat 70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.

# PCI device 0x8086:0x1064 (e100)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:20:0c:56:2b", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

# PCI device 0x1186:0x1002 (sundance)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:05:5d:5e:89:b6", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"

# PCI device 0x1186:0x1002 (sundance)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:05:5d:5e:89:b5", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x1186:0x1002 (sundance)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:05:5d:5e:89:b7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth4"

# PCI device 0x1186:0x1002 (sundance)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:05:5d:5e:89:b4", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
poundjd@ebox:/etc/udev/rules.d$

On my system I want the motherboards NIC to be the external or WAN ethernet interface  SO I use nano to change the file to

Code: [Select]
poundjd@ebox:/etc/udev/rules.d$ nano 70-persistent-net.rules
This did not work because poundjd is not root, and does not have write permissions to this directory.
so->
Code: [Select]
poundjd@ebox:/etc/udev/rules.d$ sudo nano 70-persistent-net.rules
[sudo] password for poundjd:
after saving both a backup and this file with changes
Code: [Select]
poundjd@ebox:/etc/udev/rules.d$ ls
05-options.rules            40-permissions.rules         60-persistent-storage-tape.rules  70-persistent-net.rules.backup     85-hwclock.rules    README
05-udev-early.rules         45-fuse.rules                60-symlinks.rules                 75-cd-aliases-generator.rules      85-ifupdown.rules
20-names.rules              55-hpmud.rules               61-persistent-storage-edd.rules   75-persistent-net-generator.rules  85-pcmcia.rules
30-cdrom_id.rules           60-persistent-input.rules    70-persistent-cd.rules            80-programs.rules                  90-modprobe.rules
40-basic-permissions.rules  60-persistent-storage.rules  70-persistent-net.rules           85-hdparm.rules                    95-udev-late.rules
poundjd@ebox:/etc/udev/rules.d$ cat 70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
#
# Edit history:
# 2009 04 09 JDP Modified file to move eth0 to motherboard NIC, and sundance NIC to eth1-4.
#

# PCI device 0x8086:0x1064 (e100)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:20:0c:56:2b", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x1186:0x1002 (sundance)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:05:5d:5e:89:b6", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"

# PCI device 0x1186:0x1002 (sundance)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:05:5d:5e:89:b5", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

# PCI device 0x1186:0x1002 (sundance)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:05:5d:5e:89:b7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth4"

# PCI device 0x1186:0x1002 (sundance)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:05:5d:5e:89:b4", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
poundjd@ebox:/etc/udev/rules.d$

now to shutdown, as you can see below I still make lots of mistakes
Code: [Select]
poundjd@ebox:/etc/udev/rules.d$ shutdown
shutdown: time expected
Try `shutdown --help' for more information.
poundjd@ebox:/etc/udev/rules.d$ sudo shutdown
shutdown: time expected
Try `shutdown --help' for more information.
poundjd@ebox:/etc/udev/rules.d$ shutdown --help
Usage: shutdown [OPTION]... TIME [MESSAGE]
Bring the system down.

Options:
  -r                          reboot after shutdown
  -h                          halt or power off after shutdown
  -H                          halt after shutdown (implies -h)
  -P                          power off after shutdown (implies -h)
  -c                          cancel a running shutdown
  -k                          only send warnings, don't shutdown
  -q, --quiet                 reduce output to errors only
  -v, --verbose               increase output to include informational messages
      --help                  display this help and exit
      --version               output version information and exit

TIME may have different formats, the most common is simply the word 'now' which will bring the system down immediately.  Other valid formats are +m, where m is the number of
minutes to wait until shutting down and hh:mm which specifies the time on the 24hr clock.

Logged in users are warned by a message sent to their terminal, you may include an optional MESSAGE included with this.  Messages can be sent without actually bringing the
system down by using the -k option.

If TIME is given, the command will remain in the foreground until the shutdown occurs.  It can be cancelled by Control-C, or by another user using the -c option.

The system is brought down into maintenance (single-user) mode by default, you can change this with either the -r or -h option which specify a reboot or system halt
respectively.  The -h option can be further modified with -H or -P to specify whether to halt the system, or to power it off afterwards.  The default is left up to the
shutdown scripts.

Report bugs to <upstart-devel@lists.ubuntu.com>
poundjd@ebox:/etc/udev/rules.d$ shutdown -r
shutdown: time expected
Try `shutdown --help' for more information.
poundjd@ebox:/etc/udev/rules.d$ shutdown -r 0
shutdown: Need to be root
poundjd@ebox:/etc/udev/rules.d$ sudo shutdown -r 0

Broadcast message from poundjd@ebox
        (/dev/pts/0) at 1:46 ...

The system is going down for reboot NOW!
poundjd@ebox:/etc/udev/rules.d$



_________________________________________________________________________
As you can imagine I had problems after that reboot.  The network was dead.  After re-installing a screen and keyboard I was able to login and change the file back.


Now to my question.....  How do I change the OS so that eth0 is on the motherboard - the e100 PCI device, and the Sundance NIC interfaces are configured so that b4-b7 is eth1-eth4?



Any and all help is really appreciated.  Especially links to good documentation.
-jeff







Jeffrey D. Pound, Sr.
CISSP
Still learning, hope to never stop!

poundjd

  • Zen Warrior
  • ***
  • Posts: 243
  • Karma: +0/-0
  • To your own morals be true!
    • View Profile
Re: New Installation, Udev problems.
« Reply #1 on: April 09, 2009, 10:00:45 am »
All,
how do I get the networking interfaces back up with the new udev file?  After that I could just reload eBox 1.0 using apt-get could I not?
-jeff
Jeffrey D. Pound, Sr.
CISSP
Still learning, hope to never stop!

cheesyking

  • Zen Warrior
  • ***
  • Posts: 148
  • Karma: +1/-0
    • View Profile
Re: New Installation, Udev problems.
« Reply #2 on: April 23, 2009, 12:08:41 am »
well I think you're pretty close... What did ifconfig eth0 (and all the other eths) say when you had the new udev file installed?

What was the output of dmesg|grep eth which should show what's happening to the network interfaces during bootup.

poundjd

  • Zen Warrior
  • ***
  • Posts: 243
  • Karma: +0/-0
  • To your own morals be true!
    • View Profile
Re: New Installation, Udev problems.
« Reply #3 on: April 23, 2009, 03:37:20 am »
Cheesyking,
    Thanks,

     I reinstalled eBox and had only the eth0 interface connected, it came up the way I wanted it.....  Don't want to play with it now.....
-jeff
Jeffrey D. Pound, Sr.
CISSP
Still learning, hope to never stop!