Skip to main content

Posts

Showing posts from April, 2009

Zenika Wicket Contest / Concours Wicket Zenika

It's exceptional but I wrote this post in french. It's about a contest which proposed to developed a tiny Apache Wicket project with another framework. I tried to implement it with SmartGWT.

Bon et bien voilà : je livre mon appli ZenContact migrée en GWT. Je vous préviens, je ne vais pas trop mâcher mes mots. L'objectif du concours est assez clair : refaire une petite appli de gestion de contacts réalisée à l'occasion d'une présentation Wicket au Paris JUG; le tout avec un petit défi en plus car cette présentation menée par Zenika n'a duré qu'une heure.

Bref, devant l'enthousiasme général, j'ai entrepris de la refaire en GWT. Et comme il fallait aller vite, j'ai choisi de m'appuyer sur des outils et API pour avoir le moins à coder possible. Je fixe rapidement la stack de travail : Eclipse 3.4, Maven 2, SmartGWT. Bon, c'est parti! New maven project -> template gwt. Je teste l'application générée par le plugin Maven. Jusque là tout es…

Why can I access to port 8080 only from localhost on Ubuntu?

To achieve the previous post, I had some problems today to access to my tomcat server from another machine. Ping OK but telnet 8080 KO... Humm, this smells firewall rules. Bingo! I didn't considered iptables as a firewall but it's one!

So, if you are in a secure network area, you can disable it temporarily with the following command :
sudo iptables -FYou can go further by reading this how-to page : https://help.ubuntu.com/community/IptablesHowTo

TCP Port 80 blocked on Ubuntu

While working on project, I had to bind my Tomcat to port 80 (instead of deploying an Apache and configuring its mod_jk). But, as you should know, Unix systems contains default security rules. Ports below 1024 are only allowed to the root user. Humm... it was time to work with iptables!

The following commands would show you how to add a rule to redirect request on port 80 to port 8080 and how to remove this rule.

Adding a rule :

sudo iptables -t nat -I OUTPUT --src 0/0 --dst [YOUR_IP_HERE] -p tcp --dport 80 -j REDIRECT --to-ports 8080

Saving it :

sudo iptables-save

Listing rules :

sudo iptables -t nat --line-numbers -n -L

This will show rules ordered by REDIRECT, PREROUTING, POSTROUTING and
OUTPUT. Each line start wil a number.

Deleting a rule :

sudo iptables -t nat -D [REDIRECT, PREROUTING, POSTROUTING or OUTPUT] number

Ex : sudo iptables -t nat -D OUTPUT 1