Tuesday, January 14, 2014

OpenWRT: opening ports to the WAN (aka NAT, aka port forwarding)

Opening a port to a LAN computer is simple, you can do it from the GUI:
# Port 22422 -> 10.0.0.109:22422
config redirect
        option target 'DNAT'
        option src 'wan'
        option dest 'lan'
        option src_dport '22422'
        option dest_ip '10.0.0.109'
        option dest_port '22422'
        option proto 'tcp'
        option name 'Allow-SSH-bob' 
Opening a port to your router is not so simple:
# Port 64430 -> 10.0.0.1:443
config redirect
        option src 'wan'
        option proto 'tcp'
        option src_dport '64430'
        option dest_ip '10.0.0.1'
        option dest_port '443'
        option name 'Allow-HTTPS-router-redirect'

config rule
        option src 'wan'
        option proto 'tcp'
        option dest_port '443'
        option target 'ACCEPT'
        option name 'Allow-HTTPS-router-rule' 
Source:
http://www.smallbusinesstech.net/more-complicated-instructions/openwrt/setting-up-port-forwarding-and-dealing-with-loopbacks-on-openwrt-kamikaze-8.09.1

Monday, January 13, 2014

How To Split an Audio .flac file using Ubuntu Linux

How To Split an Audio .flac file using Ubuntu Linux:

"If you have big .flac audio file which include several CD tracks, sure you are interested to know how to split them and of course we are going to do it in Ubuntu Linux.
This method it use .cue files, which usually comes with the .flac ones.
First of all we need to install the following packages cuetools shntool flac. You can use Synaptic or this command in a terminal:
$ sudo apt-get install cuetools shntool flac
Now you can split the .flac audio file as follows:
$ cuebreakpoints file.cue | shnsplit -o flac file.flac
That's all.
Now a little bit of theory,
... shnsplit is the program used to split tracks, while cuebreakpoints it reads the break-points from file.cue and pipe them to shnsplit."

Thanks to Danilo Dellaquila .

Sunday, January 5, 2014