lxadmin aka Kloxo not listening in a centos after a default installation. Please help!

Klaxo was installed without any errors. But still inside the server Klaxo and the stuffs were working, but from a browser in the WWW, it isn’t and hows cannot be found or page cannot be displayed errors

telnet ip.ip.ip.ip 7777 was working from inside the server, but not from outside network. It was showing,

telnet ip.ip.ip.ip 7777
Trying ip.ip.ip.ip...
telnet: Unable to connect to remote host: No route to host

It was returning the same for every port, except 22. In a normal situation, if the port 22 also was not working, the issue could have been network related, but in this case port 22 was working fine. So the issue was not related to networking, but …… ? Guess what ?

Yes. Any seasoned administrator should have guessed the answer to be the firewall and yes that was right. The iptables ruleset had a line which says,

REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Deleted that line and things went smooth after that.

Don’t forget to run save the iptables rules, by executing the commands below,

[root@server ~]# iptables -D RH-Firewall-1-INPUT 10
[root@server ~]# /etc/init.d/iptables save
Saving firewall rules to /etc/sysconfig/iptables: [ OK ]
[root@server ~]# iptables-save

Continue Reading

How do I redirect a given port on a given IP address to a different port on a different host or network

To redirect to external IP and port, issue these three iptables rules. I am giving an example where we had to redirect port 80 of one server’s IP to port 9001 (dotnetpanel port) of another machine. 64.192.34.215 is the IP from which are redirecting the port 80 to the destination IP, 208.24.210.233 and it’s port 9001.

iptables -t nat -A PREROUTING –dst 64.192.34.215 -p tcp –dport 80  -j DNAT –to-destination 208.24.210.233:9001
iptables -t nat -A POSTROUTING -p tcp –dst 208.24.210.233 –dport 9001 -j SNAT  –to-source 64.192.34.215
iptables -t nat -A OUTPUT –dst 64.192.34.215 -p tcp –dport 80 -j DNAT –to-destination 208.24.210.233:9001

Isn’t this similar to a tcp based proxy ?

But a simpler solution, but not flexible one, is to use rinetd. Internet redirection server. Refer http://www.boutell.com/rinetd/

Rinetd is very simple and I could achieve what I wanted in less than 3 mins, than making the nat rule work. But it had a limitation which I forgot :(

Continue Reading


 

About this blog

This blog, acts as a knowledge repository for the world and is unofficial! Anything we find interesting in the cyber world will go here. Most cases, this blog will reflect the happiness of our staff in reaching successful solution to an issue (s)he worked on. A reference for other fellow SAGEs who come across similar issues later