“Networking interface unmanaged” on Debian

I noticed this odd message “Networking interface unmanaged” in the Network icon on the system tray, which is supposed to display a list of network interfaces (at least it does that in KUbuntu). It’s impossible to manually connect or disconnect to LAN when this occurs, though an automatic DHCP connection may still be made.

Fix:

sudo kate /etc/NetworkManager/NetworkManager.conf

 

The file probably contains:

[ifupdown]
managed=false[/code]
Change false to true and restart Network Management

/etc/init.d/network-manager restart[/code]
.


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Quering DNS records – The dig tool

Basic format:

[email protected]:~$ dig droidzone.in

; <<>> DiG 9.8.1-P1 <<>> droidzone.in
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59555
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 0

;; QUESTION SECTION:
;droidzone.in. IN A

;; ANSWER SECTION:
droidzone.in. 27895 IN A 93.182.179.225

;; AUTHORITY SECTION:
droidzone.in. 85494 IN NS ns2.enames.in.
droidzone.in. 85494 IN NS ns1.enames.in.
droidzone.in. 85494 IN NS ns.enames.in.
droidzone.in. 85494 IN NS ns3.enames.in.

;; Query time: 24 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Sep 18 22:38:57 2012
;; MSG SIZE rcvd: 124

The printcmd options means that the command section (the name given to these first two line) is printed. You can turn it off by using the option +nocmd.

Dig can yield specific records like A or MX:

[email protected]:~$ dig droidzone.in A

; <<>> DiG 9.8.1-P1 <<>> droidzone.in A
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61546
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 0

;; QUESTION SECTION:
;droidzone.in.                  IN      A

;; ANSWER SECTION:
droidzone.in.           27811   IN      A       93.182.179.225

;; AUTHORITY SECTION:
droidzone.in.           85410   IN      NS      ns.enames.in.
droidzone.in.           85410   IN      NS      ns1.enames.in.
droidzone.in.           85410   IN      NS      ns2.enames.in.
droidzone.in.           85410   IN      NS      ns3.enames.in.

;; Query time: 24 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Sep 18 22:40:21 2012
;; MSG SIZE  rcvd: 124

[email protected]:~$ dig droidzone.in MX

; <<>> DiG 9.8.1-P1 <<>> droidzone.in MX
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52453
;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 4, ADDITIONAL: 10

;; QUESTION SECTION:
;droidzone.in.                  IN      MX

;; ANSWER SECTION:
droidzone.in.           28800   IN      MX      30 aspmx4.googlemail.com.
droidzone.in.           28800   IN      MX      30 aspmx5.googlemail.com.
droidzone.in.           28800   IN      MX      10 aspmx.l.google.com.
droidzone.in.           28800   IN      MX      20 alt1.aspmx.l.google.com.
droidzone.in.           28800   IN      MX      20 alt2.aspmx.l.google.com.
droidzone.in.           28800   IN      MX      30 aspmx2.googlemail.com.
droidzone.in.           28800   IN      MX      30 aspmx3.googlemail.com.

;; AUTHORITY SECTION:
droidzone.in.           85401   IN      NS      ns.enames.in.
droidzone.in.           85401   IN      NS      ns3.enames.in.
droidzone.in.           85401   IN      NS      ns1.enames.in.
droidzone.in.           85401   IN      NS      ns2.enames.in.

;; ADDITIONAL SECTION:
aspmx.l.google.com.     3       IN      A       173.194.79.26
aspmx.l.google.com.     208     IN      AAAA    2607:f8b0:400e:c01::1b
alt1.aspmx.l.google.com. 234    IN      A       74.125.142.27
alt1.aspmx.l.google.com. 97     IN      AAAA    2a00:1450:4010:c04::1b
alt2.aspmx.l.google.com. 206    IN      A       74.125.130.27
alt2.aspmx.l.google.com. 96     IN      AAAA    2a00:1450:4010:c04::1a
aspmx2.googlemail.com.  212     IN      A       74.125.142.27
aspmx2.googlemail.com.  105     IN      AAAA    2a00:1450:4010:c04::1a
aspmx3.googlemail.com.  60      IN      A       74.125.130.27
aspmx3.googlemail.com.  99      IN      AAAA    2a00:1450:4010:c04::1a

;; Query time: 353 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Sep 18 22:40:30 2012
;; MSG SIZE  rcvd: 507

[email protected]:~$

In most cases, you dont need all that output.

[email protected]:~$ dig droidzone.in MX +short
20 alt2.aspmx.l.google.com.
30 aspmx2.googlemail.com.
30 aspmx3.googlemail.com.
30 aspmx4.googlemail.com.
30 aspmx5.googlemail.com.
10 aspmx.l.google.com.
20 alt1.aspmx.l.google.com.

This option can be added as default to dig by editing ~/.digrc to have the following:

To use a different name server call dig with the first parameter as@nameserver. For example we can query ns.hosteurope.com directly like this:

	
dig @ns.hosteurope.com www.droidzone.in

My ~/.digrc contains:

 

+noall 
+answer

 


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Connecting a Windows 7 and Ubuntu PC with Samba

In Windows 7:
Start>Right Click Computer and Choose Manage>Shared Folders>Shares>Right Click Shares>New Share[/code]
Setup the default properties and permissions for the Share

Install essential packages:

sudo apt-get install samba samba-common python-glade2 system-config-samba gksu[/code]

Hit F2, type samba. You get a popup hint "Samba: Create modify and delete Samba Shares"

Create a share in Samba.
Hit the big plus sign
Browse to the appropriate directory, choose writable and type a name.

On Windows, it appears as the computer name and the share below it.

Note: Even if you make the folder writable, a windows user cant write/delete files on the share unless you change the permissions and allow group write access with a chmod command

Immediately after setting up the share in Samba, the location becomes accessible in Windows Network.

To view the Windows 7 network on Ubuntu, one should change the Ubuntu Workgroup to be same as the Windows 7 workgroup:

kdesudo kate /etc/samba/smb.conf[/code]
Edit this part and change it appropriately.

# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = HOMEPC[/code]

Once done, you need to manually share each and every folder that you want to be accessed on the Network. Even then, linux will ask you for the Windows user password when you want to connect.


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Setting up VPN

cd /etc/openvpn/easy-rsa
chmod +x /etc/openvpn/easy-rsa/whichopensslcnf
chmod +x pkitool
chmod +x build-ca
chmod +x clean-all
emacs vars
source ./vars
./clean-all
./build-ca[/code]

Copy keys from /etc/openvpn/easy-rsa/keys with file manager

emacs /etc/rc.d/init.d/openvpn[/code]

start)
echo -n $"Starting openvpn: "
# line 126: add
/etc/openvpn/bridge-start
# line 205: add
/etc/openvpn/bridge-stop
success; echo
rm -f $lock

mkdir -p /dev/net
mknod /dev/net/tun c 10 200
chmod 600 /dev/net/tun
/etc/rc.d/init.d/openvpn start[/code]

Resources to read:
http://www.server-world.info/en/note?os=CentOS_5&p=openvpn
http://wiki.vpslink.com/TUN/TAP_device_with_OpenVPN_or_Hamachi

openvpn --dev tun


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Getting info on DNS records

This is with dig, part of bindutils

dig droidzone.in

Installation:

yum install bind-utils[/code]

apt-get install bind-utils[/code]


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.