Friday, May 29, 2009

Day 1011: New Theme Long Time No Post

New theme.

Fixed broken sink.

Cleaned roof of neighbor.

Set appointment tomorrow at 4 pm.

Installed Firefox Personas.

Searched for kids educational websites. Most are not so good. Some were designed in 1992. Huh?

Almost killed the cat by accident. It likes to sit by the door. I was rushing to go out I stepped on it. Heard something snap. It writhed in pain. Am so sorry. Cat still alive but walks sidewards with its neck tilted.

Got email from Aris about his proposed web project proposal. Sent my feedback.

Monday, May 18, 2009

Day 1000: Happy 1000th Linux Day to Me!!!

On my 1000th day. I will post an interesting link to a well laid out dissertation on why Linux is still not ready for the Desktop.

For me it's a matter of perspective. Either way its true. Two sides same coin.

It's either a to do list or a bunch of lies.


http://linuxfonts.narod.ru/why.linux.is.not.ready.for.the.desktop.html

Sunday, May 17, 2009

Day 999: Debian

Ah, I am now triple booting my PC.

Ubuntu Jaunty 9.04
Debian Lenny
Windows XP

I have long wanted to use debian again mainly for its stability and to fulfill my current role as the Internet Gateway of the house network.

I will redo the steps that I have outline on Day 998 to see if I can replicate my success here in Debian.

Cheers!

Saturday, May 16, 2009

Day 998.b: They Stole the Ubuntu Logo

Let's get this straight,

FREE SOFTWARE/OPEN SOURCE DOES NOT CONDONE IP VIOLATIONS, TRADEMARK INFRINGEMENT and PIRACY.

http://www.hmrgroup.co.uk/ 



I will give you the link so that you can *pay them a visit*.

Day 998: ZOMFG INTERNET CONNECTION SHARING WORKS IT WORKS BY FSCKING GEORGE W. BUSHISHIZNITZs NAME IT BLOODY WORKS

I have almost reached my 1000th Ubuntu Day! Yay! And I have updated this post to commemorate my achievement of sharing my Internet Connection with my sisters Windows XP PCs.

UPDATE:

Wait, wait, I need to update this. It has got to be written that I made it work after weeks and weeks of toil.

Okay deep breaths. 

First, a little background: I've been trying to Setup Samba and Internet Connection Sharing for my mixed Local Area Network: Windows XP, Windows XP, and Ubuntu. Go here to see details of my problem and a diagram of our Local Area Network.





Here goes.

DISCLAIMER:

It worked for me. It might not for you. So don't blame me if you broke your PC too.

The solution for me was threefold. I followed these 3 guides and I believe that they all played a part in solving my problem. Without each I would not have solved it.


Internet Connection Sharing:

First http://ubuntuforums.org/showthread.php?t=713874
Second http://ubuntuforums.org/showthread.php?t=91370

Setting Up Samba to Enable File Sharing Between Windows and Ubuntu in a Local Area Network.

Third http://ubuntuforums.org/showthread.php?t=202605&page=2

I will put these forum posts here to preserve their value so to speak - after I eat dinner!

UPDATE: Dinner is over!


First ICS HowTo Forum Post by SpaceTeddy:


I keep reading that people want to share their internet connection through an Ubuntu computer. So, i will put down a few basic steps that one has to do to turn any ubuntu installation into a basic gateway for other computers.
The Settings i am going to write down here are permanent ! so please remember this if you use a mobile device that it will always (!) act as a gateway for the configured network card.

In the following, i will refer to the network device that is connected to the internet as eth1. It is not compulsory that the internet device is called that - other possible names are: eth0, ath0, ppp0, ... and many more.
The computer/network with the clients is, in my case, connected to the network device eth0. This can also vary quite a lot, too.
Please make sure you know what device is which for you, and adjust all commands and configurations accordingly.

The basic scheme of what this setup looks like is:

PC-Client <---> PC-Gateway (ubuntu) <---> Internet

Prerequisites
Your ubuntu Computer has internet connection and you know which network device provides this functionality.

NOTE: how you are connected to the internet does not matter (ethernet, cable, wifi, dsl), as long as you have a second network device besides the one you are connection this should work.

Configuring the network card
the network card that serves the clients (eth0) needs a static ip address. This can be done outside of network manager and would be recommended that way, since you might need nm to still connect the gateway to the internet itself.
Note that this will result in network-manager to completely ignore the network card that you configured for the client network, thus rendering eth0 unavailable in nm.

edit the network configuration file and set eth0 to a static ip. to open the config use this command

Code:
gksu /etc/network/interfaces
now, to configure eth0, you will need add a few lines to the file. Also, this configuration ONLY works on ethernet cards, NOT on wireless. If you need a wireless card to be manually configures, there are a few sticky threads in this forum that will explain how to do it. I'll try to update this later and make sure i have an example for wireless cards ready aswell

add the following lines to the file
Code:
auto eth0
iface eth0 inet static
        address 10.8.16.1
        netmask 255.255.255.0
        broadcast 10.8.16.0
        network 10.8.16.0
This will set a static ip address for eth0 (10.8.16.1) and take the network card out of nm. these changes only take effect after rebooting. To temporarily use these settings, issue this command:
Code:
sudo ifconfig eth0 10.8.16.1
Enable IP forwarding
Port forwarding is turned off in ubuntu by default. But it is needed so that the Computer will forward pakets it receives. To enable port forwarding, issue the following command
Code:
gsku gedit /etc/sysctl.conf
and look for the following line
Code:
#net.ipv4.conf.default.forwarding=1
once that one is found, remove the # so that it reads to be
Code:
net.ipv4.conf.default.forwarding=1
These changes will take effect with the next reboot. if you want them to take effect right now, use these commands
Code:
sudo sysctl -w net.ipv4.ip_forward=1
[Update]
it has been reported multiple times that the sysctl.conf got ignored. You can check that issueing this command after a reboot:
Code:
sudo sysctl net.ipv4.ip_forward
if the answer is still 0. you will need to add a line to /etc/rc.local. open it to edit with
Code:
sudo gedit /etc/rc.local
and add this line BEFORE the exit 0 in the file
Code:
sysctl -w net.ipv4.ip_forward=1
then reboot and check with the above command if it still returns 0. ONLY do this change if you have to, as this is an ugly hack to force setting...
[/Update]
Configuring iptables (paket filter)
In order to allow pakets to pass though the router, we need to add a couple of iptables rules to the filter so that everything may pass our machine. Also we need to rewrite the pakets so that they can find their way back to us.
open the file /etc/rc.local with
Code:
gksu gedit /etc/rc.local
and add the following lines
Code:
/sbin/iptables -P FORWARD ACCEPT
/sbin/iptables --table nat -A POSTROUTING -o eth1 -j MASQUERADE
Doing it this way is neither elegant nor very secure, but it is basic and it should work. If you are worried about security issues, i suggest you read up in iptables and how to confugure the rules more secure than simply letting anything pass through.
again, these changes only take effect after a reboot.
to make the changes take effect right now, use these commands
Code:
sudo iptables -P FORWARD ACCEPT
sudo iptables --table nat -A POSTROUTING -o eth1 -j MASQUERADE
Configuring the client
There are two ways to configure the client - one is a static, manual config. If you would like to do this, then give the client an ip-address in the network 10.8.16.0/24 (i.e. 10.8.16.2), the gateway 10.8.16.1 and a dns server from your computer (they can be found in the file /etc/resolv.conf)

If you have multiple client, or do not want to configure something staticially, you might want to look at setting up a basic dhcp server which issues network configurations to clients.
to install the server, type the following
Code:
sudo apt-get install dhcp3-server
this should install the dhcp-server on your machine. The start will fail, but that is nothing to worry about.
before the dhcp server itself can be configured, we need one more little bit of information. We need to know what dns servers are used so we can push then to the clients that will be configured via this server. to find out the currently used dns server, use this command
Code:
cat /etc/resolv.conf
and note down the ip addresses that are written at the nameserver statement

The next step is to configure the dhcp-server so it knows what ip-addresses to dish out and what settings.
for that, edit the file /etc/dhcp3/dhcpd.conf with this command
Code:
gksu gedit /etc/dhcp3/dhcpd.conf
save the content in a different file (for later reference or if you want to do more with it later on), and then replace it with the following basic setup:
Code:
ddns-update-style none;
option domain-name "mynetwork";
option domain-name-servers Nameserver1, Nameserver2;
option routers 10.8.16.1;

default-lease-time 42300;
max-lease-time 84600;
authoritative;

log-facility local7;

subnet 10.8.16.0 netmask 255.255.255.0 {
  range 10.8.16.50 10.8.16.150;
}
The Bold entries in the config file have to replaced by the nameserver ip addresses that you previously got. if you only have one, remove the second one.

the last thing to do before the server can be started is to tell it what interface to listen on. This can be configures in the file /etc/default/dhcp3-server.
open it with
Code:
gksu gedit /etc/default/dhcp3-server
and edit the line with the INTERFACES="" to read
Code:
INTERFACES="eth0"
the dhcp-server will be automaticially started upon reboot. to manually start it now use this command
Code:
sudo /etc/init.d/dhcp3-server start
That is all you need for a basic setup of things.
Please be reminded that you need to always check the network devices in your computer aginst the ones in the config. If you configure blindly from this and your devices are swapped or named different, you can break you computers network entirely.


Second ICS HowTo Forum Post by anaoum:


Lightbulb

Hello,

The following will explain how to share your Internet connection:

Note: Type all the following commands in a root terminal, DO NOT use sudo.

1. Start by configuring the network card that interfaces to the other computers on you network:

# ifconfig ethX ip

where ethX is the network card and ip is your desired server ip address (Usually 192.168.0.1 is used)

2. Then configure the NAT as follows:

# iptables -t nat -A POSTROUTING -o ethX -j MASQUERADE

where ethX is the network card that the Internet is coming from

# echo 1 > /proc/sys/net/ipv4/ip_forward

3. Install dnsmasq and ipmasq using apt-get:

# apt-get install dnsmasq ipmasq

4. Restart dnsmasq:

# /etc/init.d/dnsmasq restart

5. Reconfigure ipmasq to start after networking has been started:

# dpkg-reconfigure ipmasq

6. Repeat steps 1 and 2.

7. Add the line "net.ipv4.ip_forward = 1" to /etc/sysctl.conf

# gedit /etc/sysctl.conf

8. Reboot. (Optional)

I hope this helps.

Good luck!


Third Samba Setup Forum Post by Stormbringer



HOWTO: Setup Samba peer-to-peer with Windows

As many fellow Ubuntu users seem to have trouble setting up samba peer-to-peer with Windows I decided to write a small howto on this matter.

NOTE: I am aware that there's a wiki-page as well as several other howto's around - but by looking at the constant "how do I setup samba" posts that are floating around in the forum I simply see the need for a more thourough guide on this matter.

Feel free to contribute and suggest - it'll only help to make this howto a better guide.

The goal of this howto is to have samba act like a Windows Workstation in the LAN. As a "value added bonus" we will use samba to do netbios name resolution so that you can use the names of the workstations for network drive mapping instead of their ip-addresses (i.e.: \MY_WINDOWS_BOX\SHARE) - but only for as long as your Linux box has an static ip-address and is up and running.

This guide is based on Ubuntu 6.06 LTS and intended for all architectures (i386, AMD64, ...) - if you are still using Breezy it's safe to follow this guide as there should be no differencies.

A second guide on how to setup samba as Primary Domain Controller along with several other services such as DHCP, DNS and NTP will follow later on as this topic will be a little more thourough.


1. Prerequisites

- Your Linux box should have an static ip-address.
In case you're getting your ip from a router/server via DHCP make sure it's configured to provide a fixed dhcp-lease. If that's no valid option you cannot use WINS ... more on this way down.

- You need to have samba installed.
If you haven't done so already open a terminal and type:

Code:
sudo apt-get install samba
Don't close the terminal upon installation - we still need the commandline to get several tasks done!


2. Getting samba configured

First, let us make sure samba isn't running:

Code:
sudo /etc/init.d/samba stop
As a starting point I included an smb.conf below, and there are only a few simple things you may need to tweak.

Since the installation of samba just installed a rather useless template file we're going to rename it - we keep the file just in case.

Code:
sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.template
Next we create a new empty file

Code:
sudo touch /etc/samba/smb.conf
And finally we need to open the file inside an editor

Code:
sudo gedit /etc/samba/smb.conf
NOTE: If you're on KDE replace "gedit" with "kate"

Copy / Paste the contents of the code-section below into your editor and read on ...

Code:
[global]
    ; General server settings
    netbios name = YOUR_HOSTNAME
    server string =
    workgroup = YOUR_WORKGROUP
    announce version = 5.0
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192

    passdb backend = tdbsam
    security = user
    null passwords = true
    username map = /etc/samba/smbusers
    name resolve order = hosts wins bcast

    wins support = yes

    printing = CUPS
    printcap name = CUPS

    syslog = 1
    syslog only = yes

; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
    ;valid users = %S
    ;create mode = 0600
    ;directory mode = 0755
    ;browseable = no
    ;read only = no
    ;veto files = /*.{*}/.*/mail/bin/

; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
    ;path = /var/lib/samba/netlogon
    ;admin users = Administrator
    ;valid users = %U
    ;read only = no

; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
    ;path = /var/lib/samba/profiles
    ;valid users = %U
    ;create mode = 0600
    ;directory mode = 0700
    ;writeable = yes
    ;browseable = no

; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
    path = /var/lib/samba/printers
    browseable = yes
    guest ok = yes
    read only = yes
    write list = root
    create mask = 0664
    directory mask = 0775

[printers]
    path = /tmp
    printable = yes
    guest ok = yes
    browseable = no

; Uncomment if you need to share your CD-/DVD-ROM Drive
;[DVD-ROM Drive]
    ;path = /media/cdrom
    ;browseable = yes
    ;read only = yes
    ;guest ok = yes

[MyFiles]
    path = /media/samba/
    browseable = yes
    read only = no
    guest ok = no
    create mask = 0644
    directory mask = 0755
    force user = YOUR_USERNAME
    force group = YOUR_USERGROUP
Ok, I already mentioned that there are a few simple things you may need to tweak; so here they are:

-> netbios name = YOUR_HOSTNAME

Replace "YOUR_HOSTNAME" with your desired hostname (don't use spaces!). Best pratice would be to use the same name you configured upon installation.

Example:

netbios name = DAPPER

-> workgroup = YOUR_WORKGROUP

Replace "YOUR_WORKGROUP" with the name of your workgroup, but make sure you're using the same as configured in Windows.

To find out the Workgroup name in Windows follow these steps:

- Click "START"
- Click "Control Panel"
- Click "System"
- Click the 2nd Tab entitled "Computername" and find the name of the Workgroup there.

Example:

workgroup = MSHOME

-> wins support = yes

If your box doesn't have a static ip-address, or you cannot configure your router/server to provide you with a fixed dhcp-lease, change this configuration parameter to "no".

In this case you cannot use the benefits of WINS.

-> [MyFiles]

This is the name of the share. Leave it as it is or adjust it to whatever you prefer. Don't use more than 31 characters and try to avoid spaces!

-> path = /media/samba/

This suggests that you've mounted an hard drive or partition on /media/samba where all the shared files will be stored.

In case you don't have an extra hard drive/partition you may also create folder.

I assume you've been wise enough to put /home onto a separate partition having an reasonable amount of storage space.

To create the folder type (inside a new terminal) ...

Code:
sudo mkdir /home/samba
... and adjust "path =" to read ...

path = /home/samba/

Remember that this is just an example - you are free to put things wherever you like.

-> force user = YOUR_USERNAME
-> force group = YOUR_USERNAME

Well, this should say it all. Replace "YOUR_USERNAME" with the name you use for login (no spaces!).

Example:

force user = stormbringer
force group = stormbringer

Now we completed the part of editing smb.conf

Save the file and close gedit.

Since we are going to share the folder with other users we should now make sure that the permissions are set. Type:

Code:
sudo chmod 0777 /media/samba
NOTE: Don't forget to correct the path to the location you chose above!

That's it - now we need to start samba ...


1.1 Starting samba and setting up user accounts

Let us fire up samba for the first time. Type:

Code:
sudo /etc/init.d/samba start
There shouldn't be any errors - if you are presented with an error message make sure everything is correct (search for typos and/or invalid paths).

Time to add yourself as an samba user.

NOTE: You will be asked for a password - make sure you use the same as you use for login!

Code:
sudo smbpasswd -L -a your_username
sudo smbpasswd -L -e your_username
In case you need other users to be able to access the share you need to add them to your system AND samba as well. Make sure you use the very same Windows usernames and passwords!

NOTE: Windows XP doesn't set passwords for its useraccount per default. If you haven't set a password on your XP box just press enter when prompted to enter a password for the user account you're about to create!

In the following example we will add an user called "mark" ...

Example:

Code:
sudo useradd -s /bin/true mark
sudo smbpasswd -L -a mark
sudo smbpasswd -L -e mark
The "-s /bin/true" in the first line prevents the users from being able to access the commandline of your linux box ("-s" stands for "shell"). I strongly advise you to follow this recommendation! Don't change that setting to a valid login-shell unless you really know what you are doing!

Repeat this step until you configured all user accounts!

Now that we configured samba and created the user accounts we are done with the Linux-part - there's one more thing to do in Windows.


2. Changing network settings in Windows

Now we should let Windows know that there's a WINS server active in the network.

If you had to change "wins support" to "no" above skip this step!

- Click "START"
- Click "Control Panel"
- Click "Network Connections"
- Find your "LAN Connection"
- Right-click the icon and select "Properties"
- Select the "TCP/IP" Protocol and click the "Properties" button
- Click "Advanced"
- Select the third Tab entitled "WINS"
- Click "Add"
- Type in the ip-address of your Linux box
- Click "Add"
- Select "Use NetBIOS over TCP/IP"
- Click "OK"
- Click "OK"
- Click "OK"
- Reboot Windows

Upon reboot you may now map the network drive within Windows.

With WINS enabled:
- Click "START"
- Right-click "My Computer"
- Select "Map network drive"
- Choose the drive letter
- Type \\DAPPER\MyFiles
NOTE: Adjust this to the hostname and sharename you chose above!
- Click "Finish"

With WINS disabled:
- Click "START"
- Right-click "My Computer"
- Select "Map network drive"
- Choose the drive letter
- Type \\\MyFiles
NOTE: To find out the ip-address of your Linux box type "ifconfig" inside a terminal and find the ip for the correct interface (i.e. eth0). Don't forget to adjust the sharename to the name you chose above.
- Click "Finish"

That's it - samba is up and running now.


3. Security consideration

This is the right time to think about security right away.

In case your computer has more than one network connection (i.e. wired and wireless ethernet) you may want to restrict access to samba.

If not especially configured samba will bind its service to all available network interfaces.

So, let us assume you only want your wired network to have access and that the network card is called eth0.

Add the following lines to the [general] section of your smb.conf to achieve that goal:


Code:
interfaces = lo, eth0
bind interfaces only = true
If you did it correctly it should look similar to this:


Code:
[global]
    ; General server settings
    netbios name = YOUR_HOSTNAME
    server string =
    workgroup = YOUR_WORKGROUP
    announce version = 5.0
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
    interfaces = lo, eth0
    bind interfaces only = true
Now only the local loopback interface (dubbed "lo") and eth0 are able to access samba - there's no need to fear that someone might break into your system by wireless as the interface isn't bound to the service.


4. Final words

If you happen to have any questions feel free to ask - I'll try to help as soon as possible.

If you find any mistakes in this howto please let me know so that I can fix them.

Feel free to contribute and suggest - help to make this howto a better guide.


5. Addendum: Useful links

Here are some links you may find useful.

The onsite links refer to other samba-guides and to ubuntu_daemon's "Important Links" thread.

- Onsite
Ubuntu Help: Windows Networkworking
Ubuntu Documentation: Setting up Samba

READ THIS FIRST prior to posting - IMPORTANT links (by ubuntu_daemon)


The offsite links refer to the offical Samba homepage and to a selected choice of their official documentation; these links are useful if you like to dig yourself into the mysteries of samba's configuration and usage as well as troubleshooting problems.

- Offsite
Samba Homepage

Practical Exercises in Successful Samba Deployment
The Official Samba-3 HOWTO and Reference Guide
Using Samba, 2nd Edition

Whew. That was a mouthful.

After doing all of those steps. I removed firestarter - which I suspect may also be a culprit to my ICS woes.

I did:

$ sudo apt-get purge firestarter


Configuring Windows XP as a host.

Tuesday, May 12, 2009

Day 993.b: Using Windows XP

I am going to rant - mildly. My Ubuntu network woes have been taking its toll on my network. True I have managed to setup Samba to share files across platforms and computers within my network. True I have managed to ping the other computers. I have done all that. But one thing remains as elusive as Yamashita's Treasure - sharing the Internet Connection.

So right now, I am complaining because I have to use Windows XP as long as the people here need to use the Internet. I have to run a plethora of security software that takes up so much of computing resources: Avast, Zonealarm, Spybot Search and Destroy and Registry Mechanic. While all of these are all well and good and happy, I simply just HATE THEM FOR BEING PROPRIETARY.

So, now I cringe in utter disdain of my PC, typing from Google Chrome which by the way is not yet available for Linux - did somebody mention it was open source?

Now, I have Conficker or Conflicker, or whatever the heck worm sitting right beside me, or rather appears directly in front of me with a hazardous radioactive material sign with sirens blaring.

Yes, I am pissed off.

Day 993: Sleepyyyyyy.....

I am obsessive compulsive, at least I think I am.

Sunday, May 10, 2009

Day 991.c: Networking Woes Master Log

I. Objectives:


1. Establish physical connection (hardware) - /OK/
2. Establish network connection (via ping) - /OK/
3. Establish network connection (through GUI access) - /PENDING/
4. Establish file sharing - /PENDING/
5. Establish network gaming - /PENDING/

Linuxquestions forum post


Details:

Equipment:

1. CNet Network Switch
2. UTP CAT5 Ethernet Cables
3. RJ45
4. Ethernet Cards for each host

Operating Systems:

1. 2x Windows XP
2. 1x Ubuntu 9.04

Diagram:

http://s283.photobucket.com/albums/k...=homenwork.jpg


Objective:

1. ping each host to check connectivity
a. Ubuntu ping Windows
b. Windows ping Ubuntu
c. Windows ping Windows

2. Share Files
3. Play Network Games
4. Internet Access for the 3 hosts

Yet More Details:

1. I've set all of the hardware up
2. Windows hosts can ping other Windows Hosts - NOT UBUNTU

PROBLEM:

1. CONNECTIVITY

a. Ubuntu cannot ping other Windows hosts - Therefore NO CONNECTIVITY
Since I run dual boot.
b. I have not tried pinging Ubuntu from Windows XP yet
c. When I boot into Windows I CAN PING other Windows hosts

So my problem is 1.a. I have disabled the firewall of both Host 3 (Ubuntu) and Host 2 (Windows XP). I still cannot ping.



Diagnostics:

1. ifconfig

Code:
ifconfig
eth0      Link encap:Ethernet  HWaddr 00:02:44:43:b1:78  
          inet6 addr: fe80::202:44ff:fe43:b178/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9296 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10109 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:7163143 (7.1 MB)  TX bytes:1770934 (1.7 MB)
          Interrupt:11 Base address:0xe400 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:166 errors:0 dropped:0 overruns:0 frame:0
          TX packets:166 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:11042 (11.0 KB)  TX bytes:11042 (11.0 KB)

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:58.69.55.25  P-t-P:58.69.80.254  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:8829 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9633 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:6940820 (6.9 MB)  TX bytes:1530280 (1.5 MB)
2. netstat -rn

Code:
netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
58.69.80.254    0.0.0.0         255.255.255.255 UH        0 0          0 ppp0
0.0.0.0         0.0.0.0         0.0.0.0         U         0 0          0 ppp0
3. ping IP

Code:
ping 169.254.204.222
PING 169.254.204.222 (169.254.204.222) 56(84) bytes of data.
^C
--- 169.254.204.222 ping statistics ---
66 packets transmitted, 0 received, 100% packet loss, time 65021ms


Resolution Notes:

1. No clear solution remedy applied. I guess I was just lucky.
2. Followed steps to Share Internet Connection in: Ubuntuforums
3. Possibly configuring eth1 (LAN NIC) did the trick.
4. Internet Connection sharing not yet tested at time of writing
5. Ping Results:


ifconfig
eth0      Link encap:Ethernet  HWaddr 00:02:44:43:b1:78
          inet6 addr: fe80::202:44ff:fe43:b178/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5784 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6229 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4457949 (4.4 MB)  TX bytes:1350502 (1.3 MB)
          Interrupt:11 Base address:0xe400

eth1      Link encap:Ethernet  HWaddr 00:08:a1:58:ef:61
          inet addr:169.198.0.1  Bcast:169.198.0.1  Mask:255.255.255.0
          inet6 addr: fe80::208:a1ff:fe58:ef61/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1231 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1107 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:84936 (84.9 KB)  TX bytes:86685 (86.6 KB)
          Interrupt:10 Base address:0xe000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:489 errors:0 dropped:0 overruns:0 frame:0
          TX packets:489 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:56997 (56.9 KB)  TX bytes:56997 (56.9 KB)

ppp0      Link encap:Point-to-Point Protocol
          inet addr:124.107.144.17  P-t-P:58.69.80.254  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:5516 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5952 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:4320452 (4.3 MB)  TX bytes:1202770 (1.2 MB)


I keep reading that people want to share their internet connection through an Ubuntu computer. So, i will put down a few basic steps that one has to do to turn any ubuntu installation into a basic gateway for other computers.
The Settings i am going to write down here are permanent ! so please remember this if you use a mobile device that it will always (!) act as a gateway for the configured network card.

In the following, i will refer to the network device that is connected to the internet as eth1. It is not compulsory that the internet device is called that - other possible names are: eth0, ath0, ppp0, ... and many more.
The computer/network with the clients is, in my case, connected to the network device eth0. This can also vary quite a lot, too.
Please make sure you know what device is which for you, and adjust all commands and configurations accordingly.

The basic scheme of what this setup looks like is:

PC-Client <---> PC-Gateway (ubuntu) <---> Internet

Prerequisites
Your ubuntu Computer has internet connection and you know which network device provides this functionality.

NOTE: how you are connected to the internet does not matter (ethernet, cable, wifi, dsl), as long as you have a second network device besides the one you are connection this should work.

Configuring the network card
the network card that serves the clients (eth0) needs a static ip address. This can be done outside of network manager and would be recommended that way, since you might need nm to still connect the gateway to the internet itself.
Note that this will result in network-manager to completely ignore the network card that you configured for the client network, thus rendering eth0 unavailable in nm.

edit the network configuration file and set eth0 to a static ip. to open the config use this command
Code:
gksu /etc/network/interfaces
now, to configure eth0, you will need add a few lines to the file. Also, this configuration ONLY works on ethernet cards, NOT on wireless. If you need a wireless card to be manually configures, there are a few sticky threads in this forum that will explain how to do it. I'll try to update this later and make sure i have an example for wireless cards ready aswell

add the following lines to the file
Code:
auto eth0
iface eth0 inet static
        address 10.8.16.1
        netmask 255.255.255.0
        broadcast 10.8.16.0
        network 10.8.16.0
This will set a static ip address for eth0 (10.8.16.1) and take the network card out of nm. these changes only take effect after rebooting. To temporarily use these settings, issue this command:
Code:
sudo ifconfig eth0 10.8.16.1
Enable IP forwarding
Port forwarding is turned off in ubuntu by default. But it is needed so that the Computer will forward pakets it receives. To enable port forwarding, issue the following command
Code:
gsku gedit /etc/sysctl.conf
and look for the following line
Code:
#net.ipv4.conf.default.forwarding=1
once that one is found, remove the # so that it reads to be
Code:
net.ipv4.conf.default.forwarding=1
These changes will take effect with the next reboot. if you want them to take effect right now, use these commands
Code:
sudo sysctl -w net.ipv4.ip_forward=1
[Update]
it has been reported multiple times that the sysctl.conf got ignored. You can check that issueing this command after a reboot:
Code:
sudo sysctl net.ipv4.ip_forward
if the answer is still 0. you will need to add a line to /etc/rc.local. open it to edit with
Code:
sudo gedit /etc/rc.local
and add this line BEFORE the exit 0 in the file
Code:
sysctl -w net.ipv4.ip_forward=1
then reboot and check with the above command if it still returns 0. ONLY do this change if you have to, as this is an ugly hack to force setting...
[/Update]
Configuring iptables (paket filter)
In order to allow pakets to pass though the router, we need to add a couple of iptables rules to the filter so that everything may pass our machine. Also we need to rewrite the pakets so that they can find their way back to us.
open the file /etc/rc.local with
Code:
gksu gedit /etc/rc.local
and add the following lines
Code:
/sbin/iptables -P FORWARD ACCEPT
/sbin/iptables --table nat -A POSTROUTING -o eth1 -j MASQUERADE
Doing it this way is neither elegant nor very secure, but it is basic and it should work. If you are worried about security issues, i suggest you read up in iptables and how to confugure the rules more secure than simply letting anything pass through.
again, these changes only take effect after a reboot.
to make the changes take effect right now, use these commands
Code:
sudo iptables -P FORWARD ACCEPT
sudo iptables --table nat -A POSTROUTING -o eth1 -j MASQUERADE
Configuring the client
There are two ways to configure the client - one is a static, manual config. If you would like to do this, then give the client an ip-address in the network 10.8.16.0/24 (i.e. 10.8.16.2), the gateway 10.8.16.1 and a dns server from your computer (they can be found in the file /etc/resolv.conf)

If you have multiple client, or do not want to configure something staticially, you might want to look at setting up a basic dhcp server which issues network configurations to clients.
to install the server, type the following
Code:
sudo apt-get install dhcp3-server
this should install the dhcp-server on your machine. The start will fail, but that is nothing to worry about.
before the dhcp server itself can be configured, we need one more little bit of information. We need to know what dns servers are used so we can push then to the clients that will be configured via this server. to find out the currently used dns server, use this command
Code:
cat /etc/resolv.conf
and note down the ip addresses that are written at the nameserver statement

The next step is to configure the dhcp-server so it knows what ip-addresses to dish out and what settings.
for that, edit the file /etc/dhcp3/dhcpd.conf with this command
Code:
gksu gedit /etc/dhcp3/dhcpd.conf
save the content in a different file (for later reference or if you want to do more with it later on), and then replace it with the following basic setup:
Code:
ddns-update-style none;
option domain-name "mynetwork";
option domain-name-servers Nameserver1, Nameserver2;
option routers 10.8.16.1;

default-lease-time 42300;
max-lease-time 84600;
authoritative;

log-facility local7;

subnet 10.8.16.0 netmask 255.255.255.0 {
  range 10.8.16.50 10.8.16.150;
}
The Bold entries in the config file have to replaced by the nameserver ip addresses that you previously got. if you only have one, remove the second one.

the last thing to do before the server can be started is to tell it what interface to listen on. This can be configures in the file /etc/default/dhcp3-server.
open it with
Code:
gksu gedit /etc/default/dhcp3-server
and edit the line with the INTERFACES="" to read
Code:
INTERFACES="eth0"
the dhcp-server will be automaticially started upon reboot. to manually start it now use this command
Code:
sudo /etc/init.d/dhcp3-server start
That is all you need for a basic setup of things.
Please be reminded that you need to always check the network devices in your computer aginst the ones in the config. If you configure blindly from this and your devices are swapped or named different, you can break you computers network entirely.

Day 991.b: Increased Nausea Networking Ballyhoos Why People Give Up on Using Linux

Clair of newlinuxuser posted a very interesting article on her blog today entitled, "Why People Give Up on Using Linux". Well, to sum it all up, people give up on Linux because it is just hard to use. All of the points that were raised were valid:

1. No equivalent proprietary software for a specialized task (eg. Photoshop vs. Gimp)
2. No proprietary driver support.
3. No helpful and POLITE technical support.

Well for me, issues one and two are easily remedied since 1. software is always improving and 2. OEMs are slowly testing the waters for a Linux market (ugh I hate that phrase).

As for issue 3. Well, it sucks.

I have been trying to address a simple Local Area Network concern now for almost a week and here is a sample of the things that were suggested to me.

1. A person who did not read through my entire question in #ubuntu pasted a prepared spiel on how I should ask a question. The guy actually told me "that if I wanted someone to help me, I should specify my concern" or something to that effect.

Well, I am not going to engage in a debate as to whether my question is complete or not. I can guarantee anyone that I don't waste words when it comes to details. 

2. Ubuntuforums is just plainly and simply overwhelmed by support requests.

The sheer volume of web hits to its support forum is both a good thing and a bad thing. It's good because traffic is always good it means people are actually using Ubuntu. It's bad because the people who are using it most often than not, require help for the simplest of matters - meaning, the operating system cannot help the users sufficiently or it gets broken a lot.

3. Self Proclaimed 1337 Masters of RTFM and KIAs

Nobody likes Know It Alls who condescend and lord it over in ubuntuforums and #ubuntu. These are the people who are not even legitimate KIAs - but they pretend to be. They make you feel as if you should have known about a one minute detail and tell everyone in the channel how unskilled you are.


Local Area Network Conundrum

I almost lost my internet connection because of some guide I used that was supposed to transform my Ubuntu PC into an Internet Connection Sharing gateway. The number of guides in Networking is simply too sparse and dense for me to comprehend.

The people in charge of developing Ubuntu should realize that Ubuntu and most Linux distributions are heavily dependent on Internet Connectivity and as such, they should focus on making Networking a piece of cake rather than flour, eggs, vanilla, sugar, wheat, baking powder, salt, water and frosting.

After all, that is the reason why the computer was invented right? To automate stuff and save time. Right? Right?

Saturday, May 09, 2009

Day 991: The Ultra Fast Blackbox Window Manager

Photobucket

I like it - no propaganda. It's simple and lighting fast compared even to IceWm.

To install:

$ sudo apt-get install -y blackbox

Type your password.

Logout from your current session.

In the login screen, select blackbox in sessions and then login.

**I don't know why but it even makes Firefox 3 run or respond faster. But it really is fast. Can I emphasize that again? Blackbox is really ultra mega fast.

I am running:

Intel Pentium 3 650 Mhz
256 MB SDRAM PC100
Ubuntu Jaunty 9.04 (You better believe it)
Blackbox Window Manager

Friday, May 08, 2009

Day 990: Local Area Network Woes Partially Addressed

Photobucket

Finally, I was able to resolve part of the Local Area Network Problem that I had. It turns out the culprit behind the problem was an RJ45 connector which was not crimped hard enough. I can ping from XP to XP quite well with about 38 meters of UTP CAT 5 cable.

The only thing that is left to resolve would be how to ping from Ubuntu to Windows XP.

Wednesday, May 06, 2009

Day 988.b: HowTo: Take Care of a 2 Year Old While Using Linux

Image Source,Photobucket Uploader Firefox Extension

Sometimes, it can be a bit of a challenge to do some Linux tweaking if you have  three daughters like me. Specially if the youngest daughter is two years old.

So how do you tweak your Linux box while taking care of three little children?

Simple.

Get a DVD of your kids favorite cartoon (preferably an educational one) and then play it using VLC.

Be sure to make it 1/8th or 1/4th of your screen and set it to play Always on Top.

:)

Saturday, May 02, 2009

Day 984.b : Our Local Area Network Configuration and Troubles

Hi, I need a little networking help. 

Here is the layout of our noobie home network.

Photobucket



I am "Host 3". I run a dual boot machine: Windows XP and Ubuntu Jaunty.

When HOST 3 boots In Windows XP:

1. We can ping each other with some packets dropped.
2. We can see each other's icon in our workgroup
3. My computer (Host 3) cannot transfer files to and from other hosts
4. Hosts 1 and 2 CAN transfer files to and from each other
5. Host 3  CAN play network games (Tremulous) with HOST 1 and HOST 2
6. Host 3 has NO internet connectivity


When HOST 3 boots in Ubuntu

1. No connection whatsoever

*Some more information:

1. Host 1 acts as gateway, with 2 ethernet cards.
2. Host 2 can connect to the Internet using Host 1 as gateway

What I want to achieve:

1. Connect Host 3 to the Local Area Network using
    a. Windows XP
    b. Ubuntu

2. Connect Host 3 to the Local Area Network for the following reasons:
   a. File Sharing
   b. Internet Connection Sharing
   c. Network Gaming

Day 984: LAN Shark

PhotobucketI hate networking. I really hate it.

Specially after going through with extreme patience having to mull about wiring a UTP CAT5 (Straight or Crossover), climbing the roof of our house, dangling knotted wires, untangling them while performing a balancing act, going down, making wires go through unseemly holes in a wall (or window), hammering at concrete, using a staple gun for making the darn wires stick to the cabinet, going inside the toilet (which unfortunately was not flushed by one of my kids), balancing act with staple gun, through window again, staple staple staple, then scratching my head whether its supposed to be Straight or Crossover again, upon deciding finally realize that I forgot what the other end of the configuration is.

Very very exciting.

The sad part is knowing that, after all the trouble, we still cannot connect.

As a consolation, we were able to connect to each other - using Microsoft Windows. Albeit there are some minor issues like dropped packets during ping and the incapacity to transfer large amounts of files to each other.

We are connected in the sense that we can see each other's names in our workgroup and in multiplayer games.

Sooo, that didn't really address our most important need which is to share files.

It is upon realizing this fact that we decide that:

1. We are all connected to a certain extent to each other because:
   a. We can ping each other - although there are dropped packets.
   b. We can see each other in multiplayer games
   c. We cannot share large amounts of files

2. We need to share files

Photobucket

In reaching #2 we discovered LAN SHARK. It is a cross platform program at its very early stages in development that basically makes it easier to transfer files across a local area network.

We downloaded the exe file for Windows, tried it and it worked, to a certain extent. We were able to transfer bits and pieces but when it came to a large file, we were not able to resume. It is forgiveable because it is after all only version 0.0.2. A resume function wouldn't hurt.

The interface looks pretty much like GTK and at first glance is a little bit confusing.

5 minutes with it solved that confusion.

It has clients for Windows, Debian and Ubuntu.

Friday, May 01, 2009

Day 983: "Commoditization" and the Power Point... este Open What What Argument for the Suxification of Linux

I intend to be vague. Prejudice it with the fact that I drank too much coffee tonight and that the neighbors dog is still barking at 2:17 AM.

Permit me to butcher the English language by pretending to invent a word.

"Commoditization"

Ok, ok, so it exists...

Today, I also read an interesting Open Office Presentation that argued for the increased commoditization of Open Sauce, Linux, and Free Software. It garnered interest because of its catchy title: Why Linux Sucks. (Beware, I linked to an ooo file made by Bryan Lunduke.)

For the most part I agree that Open Source's mode of doing things is "different" compared to Closed Source (duh). Whether it's less effective or efficient is a matter of opinion. For that case I must digress with Bryan and many others for their argument that 'the model' should move towards the way of implicit conformity to the proprietary model. He argued for the case of standardization of software packaging, focused development for core components rather than diversification, and increased funding as primary motivation for development.

These my friends are all well and good.

But, he has forgotten something. All of it has already been done.

It's called Microsoft Windows.

End of my argument.

EventId's in Nostr - from CGPT4

The mathematical operation used to derive the event.id in your getSignedEvent function is the SHA-256 hash function, applied to a string rep...