4

I'm trying to install gitosis on a Server (hosted by OVH and running Ubuntu server 11.04). I've done it a few times and never had any problems.

But this time I have something very wired when I simply try to clone gitosis.

[root@ovks-1:~/]#git clone git://eagain.net/gitosis.git
Cloning into gitosis...
eagain.net[0: 208.78.102.120]: errno=Connection refused
fatal: unable to connect a socket (Connection refused)
zsh: exit 128   git clone git://eagain.net/gitosis.git

Based on my searches it looks like the port 9418 is closed.

But I don't understand, a server by definition shouldn't have any closed port and I can't find a way to see if they are.

So how can I check is a port is open and how can I open it if closed?

Thank you for your help.


Requested by WesleyDavid: iptables -L result

[root@odeoos-vks-1:~/]#iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination   

I have no idea what it means... Thanks :)


Update:

I finally cloned gitosis from github using https://github.com/res0nat0r/gitosis.git and it worked.

My guess is that eagain.net has an actual connection problem and that there isn't much I could do about it...

Nicolas GUILLAUME
  • 281
  • 1
  • 4
  • 10
  • Whelp... doesn't look like its iptables since it's flushed. Is there even a git daemon listening on the port? `netstat -va | grep 9148` – Wesley Apr 13 '12 at 03:12

1 Answers1

6

But I don't understand, a server by definition shouldn't have any closed port and I can't find a way to see if they are.

I think you are slightly mistaken. A server, by definition, serves. What it serves is chosen by the server administrator. Technically, a server can have all of its ports closed, although that wouldn't be a very useful server... unless it was serving things internally between services.

So how can I check is a port is open and how can I open it if closed?

The classic way of determining if a port is open is to telnet to that port and see what banner, if any, you receive. I just tried to telnet to the server you listed and the connection was immediately refused:

[wesley@Fedora1530 ~]$ telnet eagain.net 9418
Trying 208.78.102.120...
telnet: connect to address 208.78.102.120: Connection refused

A more robust way is to use a port scanning and fingerprinting tool like nmap. You can use a GUI front-end if you want it to be friendlier (example: zenmap). I'd scan that server, except it's not mine and that can be construed as hostile, so I'll leave that as an exercise for you, the original poster. =)

From where I sit, it does indeed look like there is some blockage of port 9418 between you and the git server at eagain.net - and between me and eagen.net for that matter. Contact the server/site operator and ask him "What the dilly, yo?!"


I'm a little slow on the draw tonight, and just realized that you are the server operator. So... "What the dilly, yo?!"

Anyway, you need to check iptables for any rules that would be blocking git traffic. Run iptables -L and post the results in your answer.

Wesley
  • 32,320
  • 9
  • 80
  • 116
  • Haha very nice post thank you :) Actually I'm not the server operator (at least not the one behind eagain.net). I'm just trying to clone a repository located on eagain.net server. This said it looks like my server (odeoos.com) also has the port 9418 closed. And I don't know why. – Nicolas GUILLAUME Apr 13 '12 at 02:37
  • Wait no I'm stupid it makes total sence. I have nothing waiting for a connection on the port 9418 on my server (odeoos.com) so the connection can only be refused... Anyway eagain.net should have a git deamon if I understand well... – Nicolas GUILLAUME Apr 13 '12 at 02:39
  • `iptables -L` knows all! Sees all! – Wesley Apr 13 '12 at 02:40
  • Added to my question :) – Nicolas GUILLAUME Apr 13 '12 at 02:43