|
|
|
|
|
Monday, 22 August 2011 17:13 |
In a virtual host, or when your application could run on a multiple type of OS,
it could be difficult to get the IP address corresponding to your default gateway.
Here a solution, which should be 'universal'.
This snippets try to send a datagramme on a distant host (no matter if datagrame
arrive), and
Socket.do_not_reverse_lookup=true
def get_public_ip()
UDPSocket.open do |s|
s.connect '208.80.152.2', 1 # wikipedia, connection don't need effective
s.addr.last
end
end
This option must be positionned :
Socket.do_not_reverse_lookup=true
If not, your ruby machine will try to find DNS name of wikipedia, which could
take a very long time if host is isolated.
 Read more: |
|
|
Monday, 17 January 2011 11:17 |
|
Host Based Intrusion Detection - Samhain
This article describes in some detail how to install Samhain, the
host based intrusion detection system. I am not going to ramble on about what host based intrusion detection
is or why to use it, as there are plenty of articles already covering
those subjects. This article is just to show you how to get Samhain up
and running in a client / server configuration with a couple bells and
whistles thrown in for fun. Read more: |
|
|
|
|
|
|
|