Port forwarding to my Suse doesn't work

Hi

There seems to be something strange going on with my Suse 10.2 server.

I don’t seem to be able to forward ports from my router to my server.

From my local network I can ssh into my server, view web pages hosted on it, access ftp and access any shares I want. I can even ssh and ftp from the router to the server. But when I try to access the server from the internet nothing works.

Now I’d like to add that port forwarding is working flawlessly on my router. I have ports forwarded to other computers and they all work. I’ve also tried running from the SUSE Live cd and then I was able to ssh to the server from the internet, works without troubles. So this is definately something regarding the setup of the server.

Now I’we turned off the firewall since that is the only thing I can think off that could be causing this, but that didn’t help at all.

This stopped working a few weeks ago, and as far as I remember I didn’t make any changes to the server at that time. But I could be wrong.

Any ideas?

Regards
Frímann Kjerúlf

Weired problem …

I would use either tcpdump or fireshark on your server to check what kind of requests you see from the internet.

I ran tcpdump while I was trying to connect through ssh from a host called herdubreid.rhi.hi.is. I might add that when I ran from the suse live cd, I was able to ssh to the server from this exact host (…hi.is).

The output can be found here: pastebin - collaborative debugging tool

I’m not quite sure what I can make out of this though?

Is that sufficient information from tcpdump to tell you anything? I ran the command like this:

“tcpdump host herdubreid.rhi.hi.is”

regards
Frímann

Looks like forwarding is OK.

There are options in sshd.conf which restrict access.

There is no sshd.conf file. Could it be /etc/ssh/sshd_config ?

All the files in the /etc/ssh directory haven’t changed since 2008, but this was working a month ago so I suspect it’s something else. I’ll take a look into it though.

reg
Frímann

Yes. ssh doesn’t use the common file naming

Since every service is failing to work I don’t think has anything to do with SSH. But I replaced the entire /etc/ssh directory with the files from the SUSE Live CD. But that didn’t help at all.

Now the just to summarize the situation:

If I forwards ports on my router to my server, they never work. I can though forward ports to other computers, and if I run SUSE from the LIVE CD port forwarding works flawlessly, for http, ftp and ssh.

The firewall is turned off.

So I really don’t know what could be causing this, absolutely no clue.

If hope I don’t have to set up my server from scratch because of this. That’s a big task and would take me days to get it back in it’s previous state.

If anybody has an idea about what might be causing this, then I’m ver grateful for any help/ideas.

You showed us the output of tcpdump on a session that worked. Have you got the output of a session that doesn’t work? At the very least you should see the first SYN packet from outside in that session.

Ahh no that was a dump from a session that wasn’t working. My message was maybe a little confusing.

I tried it again and here is another dump from tcpdump: pastebin - collaborative debugging tool

reg
Frímann

Turn on full protocol decode with -v or -vv as suggested.

Also do the same monitoring at the other end.

Looks like the exchange is going into a loop.

I tried running tcpdump with the -v option from both my server, and the remote computer (the one on the internet trying to access my server through the router).

I used the host command to filter, otherwize I would have ended with tens of megabites of text :slight_smile:

The ip of my router which my SUSE is behind is:
router_ip = 89.160.146.124

The ip of the remote computer is:
remote_ip = 89.160.141.231

The commands that I ran were:
on my server: tcpdump -v host 89.160.141.231
on remote pc: tcpdump -i en0 -v host 89.160.146.124

I think that’s how I should have done it?

The output from those commands was:
Dump from my SUSE server
Dump from remote PC

I don’t know what to make out of these dumps, but I really hope someone can :slight_smile: And I’m also not sure if I used the host filter correctly. But I had to use it due to the huge amount of data.

Can you make anything out of this?

reg
Frímann

Yeah, that incorrect checksum is causing the repeated retransmit and the whole exchange goes nowhere.

No idea why it gets an incorrect checksum though.

I’m not very optimistic about fixing this problem. But I’m wondering. I have some things installed on this server, f.x. raid controller with management utilities and other stuff, which takes time to setup.

Is it possible to install SUSE again, but to keep part of my settings? Similar process as “archive and install” in MacOSX if you’r familiar with that.

regards
Frímann

You could back up /home, /etc, and any server content, databases, caches, or log files in /srv and /var that you want to keep. There isn’t a set formula to do it though, you’ll have to work out a procedure.

Does this checksum error happen with any client BTW?

dreamspy wrote:

> Since every service is failing to work I don’t think has anything to do
> with SSH. But I replaced the entire /etc/ssh directory with the files
> from the SUSE Live CD. But that didn’t help at all.
>
> Now the just to summarize the situation:
>
> If I forwards ports on my router to my server, they never work. I can
> though forward ports to other computers, and if I run SUSE from the LIVE
> CD port forwarding works flawlessly, for http, ftp and ssh.
>
> The firewall is turned off.
>
> So I really don’t know what could be causing this, absolutely no clue.
>
> If hope I don’t have to set up my server from scratch because of this.
> That’s a big task and would take me days to get it back in it’s previous
> state.
>
> If anybody has an idea about what might be causing this, then I’m ver
> grateful for any help/ideas.

  • Try forwarding another port (for instance, port 25 for Postfix) and check
    if that works or is just ssh what is failing.

  • You can try “ssh -vvv user@remote_ip” to make ssh more verbose.

  • What tools are you using to make the tests (another linux box, putty on
    windows…)? I heard about some communication problems when 2 different
    versions of ssh are being used.

Greetings,


Camaleón

Are you able to look at the hardware interface stats to see if there are any packet errors?

Since access from the local network works, then the suspicion falls on the forwarding. Maybe it’s a bizarre bug involving the border router and the network software on the server. It’s an older version of openSUSE, older than the LiveCD, right?

Concerning your first question, then I’m not quite sure how to do that?

The SUSE version is 10.2, the same as on the LIVE CD. They were downloaded at the same time some years ago.

It’s a strange bug indeed, because this was working maybe 1-2 months ago. During that time I haven’t been monkey-ing around with my SUSE, since I was trapped up in school most of the time. To my knowledge nothing has changed, but of course that can’t be true, since it was working before, and now it isn’t :slight_smile:

It isn’t only SSH that isn’t working. I’we also tried ftp and http (port 21 and 80). SSH is just the only thing I tried when I was running from the LIVE CD. But forwarding those ports to other computers on my network works like a charm.

I have both done the tests from a remote SunOS machine in my school, and from my own MacBookPro from another internet connection. Both of these connections were working before, I could ssh from my school’s SunOS machine, and I could ssh from the other internet connection using my MAC just a few weeks ago.

This is actually just very straightforward. When I’m on the same network as the SUSE server I can access everything on it from my MacBookPro: ssh, http, ftp, atp, smb, etc. Just about everything. But when I’m trying to connect through the router it doesn’t work.

I tried ssh -vvv and got this:

terminal-macbookpro:~ terminal$ ssh -vvv dreamspy.net
OpenSSH_5.1p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /Users/terminal/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to dreamspy.net [89.160.146.124] port 22.
debug1: connect to address 89.160.146.124 port 22: Operation timed out
ssh: connect to host dreamspy.net port 22: Operation timed out

Basicly just a timeout.

Are there maybe any logfiles on my SUSE that can tell me more?

Although I’m not sure how much it will tell me to look solely on SSH since it is just about every service that fails to work.

ifconfig displays counters for various errors: dropped, overruns, framing, carrier.