Tuesday, November 29, 2005

NAT32 router on windows, firestarter on ubuntulinux.

We have 2 separeted networks in the company, I just wanted to redirect an extern querry from the internet, to a webserver located on the second intranet.
On windows I've been using Nat32.exe as a Router. It's quite easy, just set up all the standard rules, select a network card. Then choose config/application mapping, you have to chose a port and an Ipaddress to forward, if the ports are not standard, you'd better double-click on the application name to change the related script. the syntax is as follows.
exec "ppmap add tcp $port $addr $port"
On a linux machine, you can edit iptable. directly, or use a firewall/router program like firestarter.
Go into policy, allow connections from host, forward service, for example: web on firewall port 8000 to IP adress port 80.
It's not realy difficult. I just had a problem because I was using a hostname, it worked only with the IP address.

Tuesday, November 08, 2005

ssh secure distant shell

I've not used this yet. It's time I learn how it works. with help from this Ubuntu guide.
to install the server:
sudo apt-get install ssh
then use the client to connect:
ssh user@localhost
enter your password if needed. Et voilà you are connected to localhost, not very interesting. How can you connect remotely from a windows machine?
How do you go arround with the rsa or dsa keys and stuff? see how-to.
On windows you can use the wonderfull program putty to connect to a linux distant ssh server. You can also use winscp, a sort of secure ftp programm.
With putty, you can tunnel the vnc trafic through ssh. using the ssh tunnel on port 5900. Here is a howto. for tightVNC.
I mannaged to connect to a remote linux machine running vncserver. I want to do the oposite: connect from the linux machine to a windows machine running ssh on cygwin. Don't forget to stop the vnc process on linux, so that the port 5900 is free.
The magic formula to create a tunnel:
ssh -L 5900:localhost:5900 windowsuser@host
Then start VNC localhost on linux, there you are :)

Thursday, November 03, 2005

ethereal network sniffer

Ethereal is a programm that listens to the network traffic.
There are capture filters for example:
host 192.168.0.1
to see all the traffic comming and going to that host.
Attention, capture filters are different from display filters: an example of a display filter is
http
You'll see only the http traffic --> cool! you can see the user agent, the get requests and the sites visited by a particular host.
After capturing network trafic, you can save the result to a cap file.

Saturday, October 08, 2005

Human, robot, computer on wikipedia

When it comes to find infos about technical terms, wikipedia is now a reflex for me. Here are some more general purpose articles about human, robot and computer. I've been reading aloud the computer article and I cryed. This litany of computer related words, that was just to much.

Thursday, September 22, 2005

web server behind a router

I wanted to test the access to my web server, not with the http://localhost adress, but with the WAN adress provided by my ISP.
I set port forwarding in the router: to the port 80. But still couldn't access the files. It's because of a Lan loopback problem. Or something like that.

I had to use a proxy server instead. Search on wikipedia if you want a list of available proxies. Then with a Danish anonymus proxy, changing the browser settings to use that proxy, I could see that my site was reachable from the outside.

Wednesday, September 21, 2005

wiki moin moin

I installed the MoinMoin wiki-engine on my Unbuntu computer.
I followed the instruction in /usr/share/doc/README.Debian
But I had a problem because I changed url_prefix to "WikiBacknang". Witch I shouldn't have done. because url_prefix is for the style sheet and css. You can see the forward in apache2.conf.

This is a part of the working moin_config.py
sitename = 'Ein Wiki in Backnang'
interwikiname = None
data_dir = './data/'
url_prefix = '/wiki'
logo_url = url_prefix + '/classic/img/moinmoin.png'
# tweaks for german as primary locale
default_lang = 'de'
page_front_page = 'StartSeite'
navi_bar = ['StartSeite','HilfeInhalt','AktuelleÄnderungen','SeiteFinden']
page_iconbar = ['edit','view','diff','info','print']

apache2.conf
#this the path to css and images
Alias /wiki/ "/usr/share/moin/htdocs/"
#this is the main entry point for wiki users
ScriptAlias /BacknangWiki "/var/local/lib/backnangwiki/moin.cgi"
Voilà. It works, now I would like to have the footer in german.

Friday, September 16, 2005

Mount iso image, read ext3 from windows

To mount an .iso image, you can use virtual Daemon on windows. To mount an iso image on linux, you use the mount command. With a -0 flag. I didn't try it yet.
To read a linux ext3 partition from windows, you can use explore2fs.
Site from a belgian guy with lots of linux suff: godot.be.

Tuesday, September 06, 2005

mod_python

I installed the apache2 server. And the lib mod_python.
You'll have to edit /var/apache2/apache2.conf to add a handler for the python files. See this wizard.
To restart sudo apache2 -k restart
If you have it configured, the call to the url http://localhost/test/function will directly call the function "function" in your test.py script. Isn't it nice?
And the call to the url http://localhost/test/function?name=you will call the function with the parameter you.

Monday, September 05, 2005

Samba on Ubuntu linux

SMB how to list shares available on a host :
smbclient -L host
Then connect to a shared folder on a host, in my case:
smbclient \\\\freebox\\Disque\ dur
Then under pcmanfm (my file browser) I can access it at the addess
smb://freebox/Disque dur



Sometimes the file browser complains that the folder is not mounted.

According to this question cifs utils should now be used to mount a smb drive:
 
sudo mount -t cifs //server_name/ samba/ -o rw
Maybe this is what my file browser does in the background when I ask it to got the the smb:// address?

Old content from my 2005 blog post :
I found some interesting samba config on this forum (link not available anymore)
I also used VNC-viewer to see the desktop from a windows machine.

python, CMS

Plone a content mannagement system based on python and Zope
roWiki, a php wiki that uses only text files
twisted, a python base asynchronus networking framework:

Glade asks for users and beta testers:
Glade-3 is not much far from being usable, but unfortunately at the moment the developement is not as fast paced as we would like. Given that the Glade user base is mostly made of developers it would be great if you could help with it: work on Glade-3 may be a great learning experience since the difficulty of things you can work on range from basic GTK+ GUI programming to the deep secrets of the GObject system.