zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

Windows XP and IPv6

July 18, 2010 by Igor Drobot Leave a Comment

To install IPv6:

Start, point to All Programs, point to Accessories, and then click Command Prompt. Type in it: ipv6 install and press anter.

Normally it’s a very easy proceeder, but I had a really nice and typical windows error :) [Screen-shot below] This german error message shows, Failed to complete the action – Error “0x800704b8”

I’ve found a little command line solution; Open command prompt, paste it and hit enter and enjoy :)

1
esentutl /p %windir%\security\Database\secedit.sdb

esentutl /p %windir%\security\Database\secedit.sdb

Click to resize:

Now repeat the installation, and it will work :)

Filed Under: Windows Tagged With: Ipv6, Windows ipv6

What does this “> /dev/null 2>&1″ mean?

July 18, 2010 by Igor Drobot Leave a Comment

I remember being very confused for a very long time about the trailing garbage in commands that I saw in Linux systems.

Now I can explain it to you with a very easy example.

Standard in, out, and error

There are 3 standard sources of input and output for a program. Standard input usually comes from the keyboard if it’s an interactive program, or from another program if it’s processing the other program’s output. The program usually prints to standard output, and sometimes prints to standard error. These three file descriptors (you can think of them as “data pipes”) are often called STDIN, STDOUT and STDERR

Sometimes they’re not named, they’re numbered! The built-in numberings for them are 0, 1, and 2, in that order. By default, if you don’t name or number one explicitly, you’re talking about STDOUT.

Given that context, you can see the command above is redirecting standard output into /dev/null, which is a place you can dump anything you don’t want (often called the bit-bucket), then redirecting standard error into standard output (you have to put an & in front of the destination when you do this).

Will create a new directory

1
mkdir test

mkdir test

if you execute it second time you will get a error.
With this redirection you will suppress the error.

1
mkdir test > /dev/null 2>&1

mkdir test > /dev/null 2>&1

The short explanation, therefore, is “all output from this command should be shoved into a black hole.” That’s one good way to make a program be really quiet! That means, if you have some critical errors in your code, you will never see them.

Filed Under: Bash, Linux Tagged With: bash, dev null, Linux, output redirection

Get IPv6 Ready

July 4, 2010 by Igor Drobot Leave a Comment

First step is to register a free IPv6 address. Tunnelbroker (tunnelbroker.net) from Hurricane Electrics is one of the best ipv6 offerers. With just a few clicks, you can create a free account.

After you get your generated password to your mail-account, you can login.

After login select on the left side «User Functions > Create Regular Tunnel»;

Important: Your ISP and your Router/Gateway should allow ICMP packets.

Configuration:

1
2
3
4
5
6
7
8
9
10
11
12
# Hurricane Electrics IPv4 Server: 216.66.80.30
# My local IP Address: 87.154.168.185
 
# Hurricane Electrics IPv6 Server: 2001:470:1f0a:1514::1/64
# My IPv6 Adress 2001:470:1f0a:1514::2/64
 
/sbin/ip tunnel add he-ipv6 mode sit remote 216.66.80.30 local 87.154.168.185  ttl 255
/sbin/ip link set he-ipv6 up
/sbin/ip addr add 2001:470:1f0a:1514::2/64 dev he-ipv6
/sbin/ip route add ::/0 dev he-ipv6
/sbin/ip route add 2001:470:9d36::/48 dev lo
exit 0

# Hurricane Electrics IPv4 Server: 216.66.80.30 # My local IP Address: 87.154.168.185 # Hurricane Electrics IPv6 Server: 2001:470:1f0a:1514::1/64 # My IPv6 Adress 2001:470:1f0a:1514::2/64 /sbin/ip tunnel add he-ipv6 mode sit remote 216.66.80.30 local 87.154.168.185 ttl 255 /sbin/ip link set he-ipv6 up /sbin/ip addr add 2001:470:1f0a:1514::2/64 dev he-ipv6 /sbin/ip route add ::/0 dev he-ipv6 /sbin/ip route add 2001:470:9d36::/48 dev lo exit 0

Some additions (17.07.2010 – 21:46):
Also you can use this standard Debian configuration method “/etc/network/interfaces”:

1
2
3
4
5
6
7
8
# IPv6 over tunnel-broker
auto he-ipv6
iface he-ipv6 inet6 v4tunnel
 endpoint   216.66.80.30
 ttl        255
 address    2001:470:1f0a:1514::2
 netmask    64
 mtu        1480

# IPv6 over tunnel-broker auto he-ipv6 iface he-ipv6 inet6 v4tunnel endpoint 216.66.80.30 ttl 255 address 2001:470:1f0a:1514::2 netmask 64 mtu 1480

Of course you will need this extra route to make it working:

1
/sbin/ip route add ::/0 dev he-ipv6

/sbin/ip route add ::/0 dev he-ipv6

Check your configuration:

firewall ~ # ping6 ipv6.google.com
PING ipv6.google.com(2a00:1450:8004::63) 56 data bytes
64 bytes from 2a00:1450:8004::63: icmp_seq=1 ttl=56 time=42.6 ms
64 bytes from 2a00:1450:8004::63: icmp_seq=2 ttl=56 time=42.9 ms

firewall ~ # ping6 ipv6.google.com PING ipv6.google.com(2a00:1450:8004::63) 56 data bytes 64 bytes from 2a00:1450:8004::63: icmp_seq=1 ttl=56 time=42.6 ms 64 bytes from 2a00:1450:8004::63: icmp_seq=2 ttl=56 time=42.9 ms


IPv6 routing table:

1
ip -6 r

ip -6 r

Check your security:

1
nmap 2001:470:1f0a:1514::2

nmap 2001:470:1f0a:1514::2

Some screen shots:






IPv6 logo taken from: Hetzner.de


Filed Under: Debian, IPv6, Linux, Networking, Nmap Tagged With: Debian, IP version 6, Ipv6

Convert mp4 to mp3

June 23, 2010 by Igor Drobot 1 Comment

In this little tutorial I show you how to convert mp4 to mp3.

First method:

1
vlc some-video.mp4 --sout '#transcode{acodec=mp2a, ab=96}:std{access=file, dst= "my_new.mp3", mux=ts}'

vlc some-video.mp4 --sout '#transcode{acodec=mp2a, ab=96}:std{access=file, dst= "my_new.mp3", mux=ts}'

Second one:

Your copy of FFmpeg needs to be capable of outputting mp3:

1
ffmpeg -formats | grep libmp3lame

ffmpeg -formats | grep libmp3lame

1
ffmpeg -i 2Invention_Lonely_Star.MP4 -acodec libmp3lame -ab 128k 2Invention.mp3

ffmpeg -i 2Invention_Lonely_Star.MP4 -acodec libmp3lame -ab 128k 2Invention.mp3

Or a loop for more than one file:

1
for f in *.mp4; do ffmpeg -i $f -acodec libmp3lame -ab 128k $(echo $f | sed 's/\.mp4$/\.mp3/'); done

for f in *.mp4; do ffmpeg -i $f -acodec libmp3lame -ab 128k $(echo $f | sed 's/\.mp4$/\.mp3/'); done




Convert to WAV:

1
mplayer -ao pcm 2Invention_Star.MP4 -ao pcm:file="2Invention_Star.wav"

mplayer -ao pcm 2Invention_Star.MP4 -ao pcm:file="2Invention_Star.wav"

A little convert loop:

1
2
3
4
5
6
7
#!/bin/bash
# 
# m4a2wav
# 
for i in *.m4a; do
    mplayer -ao pcm "$i" -ao pcm:file="${i%.m4a}.wav"
done

#!/bin/bash # # m4a2wav # for i in *.m4a; do mplayer -ao pcm "$i" -ao pcm:file="${i%.m4a}.wav" done

Filed Under: Linux Tagged With: Convert mp4, mp3, mp4 to mp3, Ubuntu

Chmod quite different

June 23, 2010 by Igor Drobot Leave a Comment

1
chmod -R u=rwx,g=rwx,o=rx white/

chmod -R u=rwx,g=rwx,o=rx white/

u = User
g = Group
o = Other

Filed Under: Bash, Linux Tagged With: Chmod, Linux, Unix

  • « Previous Page
  • 1
  • …
  • 68
  • 69
  • 70
  • 71
  • 72
  • …
  • 74
  • Next Page »
Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok