Wednesday, October 24, 2007

Install SWAT on Ubuntu

sudo apt-get install swat

apt-get install xinetd

then, sudo vi /etc/inetd.conf

and uncomment the line:

## swat stream tcp nowait.400 root /usr/sbin/tcpd \ /usr/sbin/swat

Then make an entry for Swat under xinetd with sudo vi /etc/xinetd.d/swat

And it should look like this:
# description: SAMBA SWAT
service swat
{
disable = no
socket_type = stream
protocol = tcp
#should use a more limited user here
user = root
wait = no
server = /usr/sbin/swat
}

Then:
sudo dpkg-reconfigure xinetd

to restart with the new configuration.

Now the netstat -lt should echo something similar to this:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:5666 *:* LISTEN
tcp 0 0 localhost:1026 *:* LISTEN
tcp 0 0 localhost:1027 *:* LISTEN
tcp 0 0 *:swat *:* LISTEN
tcp 0 0 localhost:mysql *:* LISTEN
tcp 0 0 *:netbios-ssn *:* LISTEN
tcp 0 0 *:10000 *:* LISTEN
tcp 0 0 *:1040 *:* LISTEN
tcp 0 0 *:munin *:* LISTEN
tcp 0 0 localhost:ipp *:* LISTEN
tcp 0 0 *:smtp *:* LISTEN
tcp 0 0 *:microsoft-ds *:* LISTEN
tcp6 0 0 *:2080 *:* LISTEN
tcp6 0 0 *:www *:* LISTEN
tcp6 0 0 *:ssh *:* LISTEN
Which indicates the swat service is running and listening to the correct 901 tcp port.

You might be able to access http://:901/

No comments: