# Unable to connect to server through router with newer kernel

## tvorup

Hi,

I have a small server at home that I use for small projects. Some of these projects require the server to be available from the internet, so I've opened two ports in my router (HTTP and SSH) and have the router forward the data to the server.

This has worked without a hitch for quite some time, but ever since the Linux kernel hit version 3, I've been unable to access it from the internet. If I start it using a 2.6-kernel, there's really no problem. Then I can restart it using kernel 3.* (currently 3.3) and I can't access it. I've tried compiling several kernels with different options (e.g. IPv6) turned off to eliminate that some feature causes it.

The server has two network interfaces, and these are connected to two different networks. The services (both HTTP and SSH) are accessible from the local networks on both interfaces on both 2.6.* and 3.* kernels.

Both 2.6 and 3.* kernels are compiled using genkernel.

Of course, I could just keep running 2.6-kernels, but I do like to keep up on what's new with Linux, and it should be possible to access a Linux server through a router, I think...

What am I missing?

Thanks in advance,

Jan

----------

## Hu

When running kernel 3.3, can you establish outbound connections to the Internet machine that you are using to test inbound traffic?  Have you confirmed that the incoming connection attempt reaches the server when running a 3.3 kernel?  If yes, does it respond at all?

----------

## py-ro

Show your Interfaces and Routingtable.

----------

## tvorup

I have verified that I'm able to connect to a host, that cannot connect to my server.

I'm not quite sure how to test if the connection attempt reaches the server, if there's no connection made. Could you provide me with a hint?

I do however expect that it does, since I'm able to connect using the 2.6 kernel and I've done nothing but reboot the server and choose a new kernel.

My interfaces look like this:

```
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.2  netmask 255.255.255.0  broadcast 192.168.1.255

        ether 00:40:63:ed:a0:64  txqueuelen 1000  (Ethernet)

        RX packets 7427  bytes 684957 (668.9 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 6536  bytes 716406 (699.6 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

        device interrupt 12  base 0x4000

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 10.10.0.2  netmask 255.255.255.0  broadcast 10.10.0.255

        ether 00:40:63:ed:a0:65  txqueuelen 1000  (Ethernet)

        RX packets 4860  bytes 2186587 (2.0 MiB)

        RX errors 0  dropped 3  overruns 0  frame 0

        TX packets 5514  bytes 704738 (688.2 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

        device interrupt 12  base 0x6000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 16436

        inet 127.0.0.1  netmask 255.0.0.0

        loop  txqueuelen 0  (Local Loopback)

        RX packets 29449  bytes 8141572 (7.7 MiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 29449  bytes 8141572 (7.7 MiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
```

My routing table looks like this:

```
Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

default         10.10.0.1       0.0.0.0         UG    1      0        0 eth1

default         192.168.1.1     0.0.0.0         UG    3      0        0 eth0

10.10.0.0       *               255.255.255.0   U     0      0        0 eth1

loopback        localhost       255.0.0.0       UG    0      0        0 lo

192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
```

/Jan

----------

## tvorup

Sorry guys, I hope I didn't waste too much of your time.

I deleted the top linie in route and everything works perfectly.

I guess in 2.6, the kernel used eth0 af default route for 0.0.0.0, and in 3.3 it uses eth1.

/Jan

----------

