You are not logged in.

#1 2010-06-14 17:51:29

Nvveen
Member
Registered: 2010-06-14
Posts: 11

Port forwarding, NAT, SSH and Transmission.

A couple of days ago I decided to setup the Transmission daemon, along with automatization for my downloads. Recently, however, to put a layer of security around my laptop, I set up a wireless router I had lying around that is now connected with a wire to my laptop. The reason for this is that I have no idea how iptables work yet, and until then I decided this will suffice for the moment. One of the problems though (yes, problems seems to come in twenty-fold where my luck is concerned), is that when I rewire my laptop directly to the internet, without the router, NetworkManager or Archlinux doesn't reset the ip address, which for some reason jumps to 192.168.1.122, which it never uses otherwise. I haven't yet tried reinstalling networkmanager, but when I did turn it off, dhcpdcd assigned the same address... The problem here being that it shouldn't assign a LAN-address, I'm directly connected to the internet. Sidenote here though; my internet connection is just a plug in the wall, the operators here (I live on a kind of campus), probably only use a network-switch to relay the traffic to the socket.

That's that, my wired network doesn't work directly, only via the wireless router, wired or wireless. Because of this, I have to use port-forwarding for SSH (to test if the port forwarding works), and the Transmission daemon with an rcmp port of 9091., which was my intention in the first place. I have no idea if logging into my.ip.address.here:9091 in a browser would work, I just used localhost:9091.

Now for the results:

$ nmap -sT xx.xxx.xx.xx

Starting Nmap 5.21 ( http://nmap.org ) at 2010-06-14 19:42 CEST
Nmap scan report for xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Host is up (0.038s latency).
Not shown: 996 closed ports
PORT     STATE    SERVICE
22/tcp   filtered ssh
53/tcp   open     domain
80/tcp   open     http
9091/tcp filtered unknown

Here it shows that the ports are actually not closed, but they're not exactly opened either, from what I gathered from the internet.
SSH shows the true problem:

$ ssh neal@xxxxxxxx
ssh: connect to host xxxxxxxx port 22: Connection timed out

SSH-ing to 192.168.0.102 (my internal ip) works, as does to localhost, same for Transmission webGUI. Before I used port-forwarding ssh would correctly say that it couldn't get traffic from the router.

My router is a cheap solution to another problem I had, but it should work like any router. It's a Sitecom WL-607. I disabled login authentication for the moment. Also, there is no filtering going on in the firewall. Like I said earlier, I don't get iptables, so that's not being used. The hosts file allows all and denies nothing.

TLDR version; I'm using port-forwarding on my Sitecom WL-607, but all ports except http and the 53 port are being blocked.

Is there something I'm missing here?

Thanks in advance,

Neal van Veen.

Offline

#2 2010-06-15 21:53:45

Sin.citadel
Member
Registered: 2008-01-22
Posts: 267

Re: Port forwarding, NAT, SSH and Transmission.

by default, all routers assign there clients an ip address from there internal pool of addresses, your wireless router is assigning you that address and then NAT's the connection with the WAN side, but even after directly plugging in to the wall socket you still dont get a new ip address, use dhcpcd <mydev> in terminal to reresh dhcp lease. if not then your campus/location/etc may also be using NAT on there own side.

as for the ports, iptables doesnt block any traffic by default, it allows everything. if there is filtering, it is from your wireless router.

on the above ssh and nmap scans, did u use your lan ip, or your public ip.

Offline

#3 2010-06-23 18:12:09

Nvveen
Member
Registered: 2010-06-14
Posts: 11

Re: Port forwarding, NAT, SSH and Transmission.

Thanks for the reply,

I figured it out, and just to keep it uncomplicated, I use DHCP assignment on my router, but static on wicd (networkmanager kept protesting). Every port I want on just my laptop I just forward to the assigned IP for every assigned IP every service needed. Should I want another ip for example, to have an open SSH port, I'll just configure it to something else and forward that port too.

Thanks for your help though, figuring out cheap routers is a PITA tongue

Offline

Board footer

Powered by FluxBB