SuSEfirewall blocking all connections tunnelled over ssh

My home computer has 11.3 and SuSEfirewall enabled. It connects to the net over the wireless and SuSEfirewall has this connection in the external zone.

I can successfully ssh into this computer from remote (the work computer) but none of the ssh port-forwarded connections work. I’m trying to tunnel VNC over ssh. I also tried setting http on the home computer to serve pages on a high-numbered port (8090) and tunnelling that but it also didn’t work - proving that it’s not a VNC problem.

Here are the relevant messages from the firewall logs on the home machine:

Sep 14 10:33:52 homemachine kernel: [97500.489014] SFW2-INext-DROP-DEFLT IN=wlan0 OUT
= MAC=00:13:e8:9d:73:59:00:24:01:36:74:9c:08:00 SRC=95.91.92.92 DST=192.168.0.19
4 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=53019 DF PROTO=TCP SPT=55227 DPT=5900 WIND
OW=5840 RES=0x00 SYN URGP=0 OPT (020405B40402080A05CB29670000000001030306)

Sep 14 10:42:12 homemachine kernel: [98000.431658] SFW2-INext-DROP-DEFLT
IN=wlan0 OUT= MAC=00:13:e8:9d:73:59:00:24:01:36:74:9c:08:00
SRC=95.91.92.92 DST=192.168.0.194 LEN=60 TOS=0x00 PREC=0x00 TTL=64
ID=52225 DF PROTO=TCP SPT=44038 DPT=8090 WINDOW=5840 RES=0x00 SYN
URGP=0 OPT (020405B40402080A05D2CA4F0000000001030306)

I don’t understand why this isn’t working now, I had the same setup on 11.2 and it worked fine.

Edit: The 95.91.92.92 is the public IP address of my home router, I don’t understand why a connection would appear to be coming from there when I use ssh-tunnelling?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Could you post the full SSH command line for doing the forwarding, plus
perhaps what you see both in the SSH session as well as from VNC (started
from the command line) when trying to access the remote box?

#login to SSH
ssh -L 5900:localhost:5900 youruser@remotebox.goes.here

#launch vncviewer from the SSH-client machine to use the tunnel
vncviewer localhost

Good luck.

On 09/14/2010 07:40 AM, tk83 wrote:
>
> My home computer has 11.3 and SuSEfirewall enabled. It connects to the
> net over the wireless and SuSEfirewall has this connection in the
> external zone.
>
> I can successfully ssh into this computer from remote (the work
> computer) but none of the ssh port-forwarded connections work. I’m
> trying to tunnel VNC over ssh. I also tried setting http on the home
> computer to serve pages on a high-numbered port (8090) and tunnelling
> that but it also didn’t work - proving that it’s not a VNC problem.
>
> Here are the relevant messages from the firewall logs on the home
> machine:
>
> Code:
> --------------------
> Sep 14 10:33:52 homemachine kernel: [97500.489014] SFW2-INext-DROP-DEFLT IN=wlan0 OUT
> = MAC=00:13:e8:9d:73:59:00:24:01:36:74:9c:08:00 SRC=95.91.92.92 DST=192.168.0.19
> 4 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=53019 DF PROTO=TCP SPT=55227 DPT=5900 WIND
> OW=5840 RES=0x00 SYN URGP=0 OPT (020405B40402080A05CB29670000000001030306)
>
> Sep 14 10:42:12 homemachine kernel: [98000.431658] SFW2-INext-DROP-DEFLT
> IN=wlan0 OUT= MAC=00:13:e8:9d:73:59:00:24:01:36:74:9c:08:00
> SRC=95.91.92.92 DST=192.168.0.194 LEN=60 TOS=0x00 PREC=0x00 TTL=64
> ID=52225 DF PROTO=TCP SPT=44038 DPT=8090 WINDOW=5840 RES=0x00 SYN
> URGP=0 OPT (020405B40402080A05D2CA4F0000000001030306)
> --------------------
>
>
> I don’t understand why this isn’t working now, I had the same setup on
> 11.2 and it worked fine.
>
> Edit: The 95.91.92.92 is the public IP address of my home router, I
> don’t understand why a connection would appear to be coming from there
> when I use ssh-tunnelling?
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJMj4SDAAoJEF+XTK08PnB5dYoP/j2RtytFJmKjEl9ttzWbc//R
z72YrpKAkmZpVNIKbpd3oioTC8sdnfU/XzfoWrAt0BnnmnXNaXVAgI+ITcu4D7Kq
Ld9eIz1o/YaTlFHxJ/vXkp8eFH1jx/cGR66YBWgzU9cXpcuv4TPo6nhddSzHk9dj
mJpDq3RwkuNa/kjYb8Ae9JZYTB2Q1tJ3PTBVgXsUyXyZd+vzIGOuVU5VzLa3PMi+
y4znC+HDe99zofNf6p10Sv1lcVMaofxdiMzu1bFfWhDhCI6pXlEcZ6xTkeHA/8xn
spRDVR3kqlvE/jzrPwj5XutqrRXE9hcp/zJTDxd8wi6WY0nmDYMZttUWrvvUb2eU
EmGesj6X/wAH6MJoSt+9gIUkRKh8HviTL5LW2NMsnlr0gzRckAgwXLJid+3vmS+z
GWHEWPWmt8HzCbO4MmcFwY+Oa+pxwEly/qP6tApe59IG2hwT35mafyLawtifmozL
oDP/N1pf5aLmOGsA3Z8VR64IKSMXWdOozl8B9OM4C6NJgICZoYxWKV7Ls0x7t+jv
CcE/T6anrjFXjvJqIQAtQRyEXhrii9I1iuP7zBlq2UOhzVGmm8/M9V8IlOvDxz7G
k7XjgzHxCo44hoOZPz6pLfuK0WJ+hq7BrWBTjkF9k7rnCU97yB9OGcpLqIA1cXnZ
GE9yNVrXqQLDH4U++v3D
=CIZD
-----END PGP SIGNATURE-----

The command I’m using to connect is:

ssh -L 5900:myhomemachine.selfip.net:5900 -p 443 tim@myhomemachine.selfip.net

(note that the SuSEfirewall on my home machine redirects port 443 to ssh to avoid continuous password-guessing attacks on port 22)

I’ve just found a workaround to this problem, if I change the ‘host’ part of the forwarding specification to be the internal IP address of my home machine on the home network it works:

ssh -L 5900:192.168.0.194:5900 -p 443 tim@myhomemachine.selfip.net

I don’t understand why this is? I didn’t need to do this in 11.2 and the whole thing seems wrong to me - ssh forwarding should work and shouldn’t be interfered with by the firewall.

Edit: Just to note my home machine is in the ‘DMZ’ in the wireless router, ie. any firewall on the home router should not be a factor in this. Besides none of these settings have changed since I ran 11.2.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It looks like it is behaving as suspected, and correctly. At home what
does ‘myhomemachine.selfip.net’ resolve to? Did it resolve to the exact
same IP address before? It is possible (likely?) that the machine you are
SSH-ing to used to resolve that IP differently (to a private IP perhaps)
or maybe it is possible that the default firewall rules have changed to be
based on IP more than on device. Feel free to post the output of sudo /usr/sbin/iptables -L -n -v or sudo /usr/sbin/iptables-save to show us
how the firewall is setup on your machines. Also knowing a bit more about
how IPs and DNS are setup could help:

ip addr
ip route
cat /etc/hosts

Good luck.

On 09/15/2010 03:06 AM, tk83 wrote:
>
> The command I’m using to connect is:
>
> Code:
> --------------------
> ssh -L 5900:myhomemachine.selfip.net:5900 -p 443 tim@myhomemachine.selfip.net
> --------------------
>
> (note that the SuSEfirewall on my home machine redirects port 443 to
> ssh to avoid continuous password-guessing attacks on port 22)
>
> I’ve just found a workaround to this problem, if I change the ‘host’
> part of the forwarding specification to be the internal IP address of my
> home machine on the home network it works:
>
> Code:
> --------------------
> ssh -L 5900:192.168.0.194:5900 -p 443 tim@myhomemachine.selfip.net
> --------------------
>
>
> I don’t understand why this is? I didn’t need to do this in 11.2 and
> the whole thing seems wrong to me - ssh forwarding should work and
> shouldn’t be interfered with by the firewall.
>
> Edit: Just to note my home machine is in the ‘DMZ’ in the wireless
> router, ie. any firewall on the home router should not be a factor in
> this. Besides none of these settings have changed since I ran 11.2.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJMkPi9AAoJEF+XTK08PnB5TTkP/0ibP0g0y781j2pIJnzhx/B0
xwoL4YGJY84odfYanVDTqLSrnHhHVyNu1HR4E/h2hF2pFJms1g5hw9cVmlZPauBW
QMxSW0aeoNC60PxSPZA2xbBEVZvP7Ft3S6fo2cs9KjusK7+OFeuEF1dIdTEpZoiB
xWnx4JFd6grsOekdzap88+h3rWmV+1VS+0yNovcWnA5Pae176BMruPwVzrNhP9x5
iYc4Xac0BjssB9US26LxK/wJERdDzuEP9k4y4D9wS9JsM3KNqTPJIYYVn/e7c+7F
UaS9l+d08P4Ew1ScJZTwdpVd0kZuOfyJbpjQXFlxYl9NiXlAsvpTfqluE27MyPZW
RFG9OsfpdXRnDu++el0utoZ7aZTpL1kXithcM7DWT0WahGn0TFGn1qGzztZGYYMz
2HFdGa48Tpajv1SKhlGkmuDJ+EjrZsaoQcf5fAIX3jSESlxM6gPik1hCPCiXNiRg
/hUDb4gkQgvzIVB99PfXApIXR6fqw/XgfbzEI55Aec+OZtToy84Zpf1sujyfMU0Z
cGjH0RnVmWoRw9473bK2bW2M3MCXbggcekqYAKaxnZuSIAMrWHr3c58ZMaCCIQry
D1CGQx9r617TVwzvmGEWRvsBcpPMu92CPIV0y8aGXurMk2nXAbTwUBFFPEIY/RJK
2qafp4EYL3xVGwD4p+UP
=qzNJ
-----END PGP SIGNATURE-----

I’ve worked out the problem now. I should’ve used localhost in the forwarding option, ie.

ssh -L 5900:localhost:5900 -p 443 tim@myhomemachine.selfip.net

It would also have worked with 5900:myhomemachine.selfip.net:5900 if I’d correctly typed in the hostname when I setup the machine, since Opensuse would’ve setup this line in /etc/hosts:

127.0.0.2       myhomemachine.selfip.net myhomemachine

But anyway using 5900:localhost:5900 is the best solution since it doesn’t rely on /etc/hosts being setup properly.

Thanks for your help with this

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Good to hear! Thank-you for posting back your results.

Good luck.

On 09/16/2010 04:36 AM, tk83 wrote:
>
> I’ve worked out the problem now. I should’ve used localhost in the
> forwarding option, ie.
> Code:
> --------------------
> ssh -L 5900:localhost:5900 -p 443 tim@myhomemachine.selfip.net
> --------------------
>
>
> It would also have worked with 5900:myhomemachine.selfip.net:5900 if
> I’d correctly typed in the hostname when I setup the machine, since
> Opensuse would’ve setup this line in /etc/hosts:
>
> Code:
> --------------------
> 127.0.0.2 myhomemachine.selfip.net myhomemachine
> --------------------
>
>
> But anyway using 5900:localhost:5900 is the best solution since it
> doesn’t rely on /etc/hosts being setup properly.
>
> Thanks for your help with this
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJMkhdqAAoJEF+XTK08PnB5SLEQAKcqzdV9AhYUepte8bVmmy4Z
+kB9X/qdhy5xGzAxr9ztyNXnhFCj9+WgtIz5JCL4Fv8LrI+u1CBR7qRiQqX7ZnQQ
2mJIpPjSG+HG++FUKarB/DVughHEHlGv/nplyDcikZrdIKWW1OQ1HA2Sxu8j36m5
nHuAO6L7Q/+iTRPgZ6lq403/lLIyt0TeiwjSItwS9pK9lNUkpICCIQcPhVpnmO+H
X37xQz2hyLb/jeLOTZ3S/5+lRU+yRvP2fndvwJ2CIU5OJF/JVPS1q5o7baCFpNlQ
YkqxLzyV8zf/cOTyCDGcdXw8n0t9vI33dnmqlpR3SM2/9xM0RXG306rD3env0NFI
SDwRuLeFHtwO50p9WrMb66ggn8QFuFbug8gZZ1jUK3KC1j7rtM0/MDhwF4tBkyqr
6XJccbEx3U2jorJgqB5a/liucOhQf2QgGfebehVhfm9bFrAGmZFMa1tiJJ5qow45
H/IUBUXnCNhzZ3Klo1XBouJo+TV70cDS0dnAgTzMtBg+WoqR1xGt7E/4lnlWDna7
hW1XWo8RNfW8SaA4fLGCo0hBgABLdJEYduz+N4+lxcW1Ld0IIv06F4OO2Kj7BPFW
bpuNCtanW7tvtwVjzl3/3CWSE+Hmvi5V7y38iQnpZk5+NI0Jt2c0Yp8q4D3JFQZK
TL76sCl6uO5u+dWuULAQ
=sOKr
-----END PGP SIGNATURE-----