DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-07-22 17:50:20

audifreakje
Member
Registered: 2007-07-08
Posts: 9

ftp accessprob over internet

the past days I have tried to access my dns over the internet.
here is my home lan setup: cablemodem for internet connected to a dlink di 524 (fw v2.02), the di524 serves as dhcp and has furthermore the following devices connected (either wired/wireless): two desktops, one laptop, windows mobile device, xbox 360 no problems so far.
I have started the ftp server and can access it while I'm home, but not over the internet.
the fw on my dns is 1.03.
the dns doesn't do dhcp and recieves a fixed private ip from the di524.
changes done on the router: allowed ports 20 & 21 externally to access the dns internally / enabled DDNS (I've created a ddns domainname that is mapped to my wan IP / discard ping from wan side: disable / SPI mode: disable / UPNP mode: enable / vpn pass through : enabled / xbox support : enabled / Dos Protection : enabled.
Changes on the dns: LAN settings: gateway is router IP, dns 1 is ISP DNS, dns 2 is router IP / ftp access list : mapped the volume as R/W for administrators.

problem is that while I'm away from home I can't access the device via ftp, it just times out or something.
My guess is that I've overlooked a small detail in the setup ...

Offline

 

#2 2007-07-22 23:28:29

ka3ak
Member
From: Calgary, Canada
Registered: 2007-07-16
Posts: 21

Re: ftp accessprob over internet

So the network layout is this : cable modem <-> (router) Di524 <-> laptops, desktop, Xbox DNS 323 , etc. ?

DNS 323 has to have static internal IP (which is true in your case) from DHCP(router). port 20, 21 have to be forwarded to the local IP for DNS 323. Make shure that domain name is really mapped to your IP address. Just tracert your domain name it should show your WAN IP.

If you could post the screenshots of your setup - especially in the place where you are saying that

allowed ports 20 & 21 externally to access the dns internally

and

LAN settings: gateway is router IP, dns 1 is ISP DNS, dns 2 is router IP

I think the dns2 should be blank, the phrase

allowed ports 20 & 21 externally to access the dns internally

is not clear to me.

Offline

 

#3 2007-07-23 11:56:52

audifreakje
Member
Registered: 2007-07-08
Posts: 9

Re: ftp accessprob over internet

thx for the suggestions
as for the tracert exercise; it shows indeed my wan IP.
I will post the screenshots later on today.

Offline

 

#4 2007-07-23 20:31:45

audifreakje
Member
Registered: 2007-07-08
Posts: 9

Re: ftp accessprob over internet

here are the screenshots of the firewall rules/virtual server entries on the di-524 as requested.
fwiw I have removed the DNS2 entry from the lan settings in the DNS323, will check tomorrow then from work if that does anything.

Offline

 

#5 2007-07-24 16:20:39

kymlp
Member
From: Melbourne, Australia
Registered: 2007-05-28
Posts: 17

Re: ftp accessprob over internet

I haven't yet managed to get ftp remotely working either, but I can get to the ftp server - I just don't seem to get past the password authentication. Anyway, first things first:

1. Have you successfully been able to login to your router from the internet? This will prove that you can get to it OK. (Set the "remote access" to enabled and see if you can get that far.)

2. Your firewall rules look OK - but I'm not expert. Just an observation - I would never open port 21 on the WAN side to the internet ... way too many hits on that port that can create security issues. Set your external port to something like 8821 on the WAN side, natting to port 21 on the LAN side. Then you ftp xxx.yyy.zzz.vvv:8821 to get to the alternate port.

Offline

 

#6 2007-07-25 08:39:27

ka3ak
Member
From: Calgary, Canada
Registered: 2007-07-16
Posts: 21

Re: ftp accessprob over internet

kymlp wrote:

I haven't yet managed to get ftp remotely working either, but I can get to the ftp server - I just don't seem to get past the password authentication. Anyway, first things first:

1. Have you successfully been able to login to your router from the internet? This will prove that you can get to it OK. (Set the "remote access" to enabled and see if you can get that far.)

2. Your firewall rules look OK - but I'm not expert. Just an observation - I would never open port 21 on the WAN side to the internet ... way too many hits on that port that can create security issues. Set your external port to something like 8821 on the WAN side, natting to port 21 on the LAN side. Then you ftp xxx.yyy.zzz.vvv:8821 to get to the alternate port.

Good observation in point 2 smile Never thought about that .... On one side it sometimes creates inconvinience - you would have to explicitly put the port for connection and some users are not comfortable with that but who cares... ?

audifreakje
I went to the Dlink page and found emulator for the DI 524... It gives me some idea what are the settings for your router... I got Linksys so the settings are different. Anyway, there are couple thoughts that I came uo with :

1) Check with your ISP if they have port 21 & 20 open .... Some of the providers as procaution, close most of the frequently used ports except 80.... For example, Telus (Canada) has port 25 closed for SMTP. Shaw(Canada) has closed couple of ports on some of their nodes such as 6881(used mostly for torrent) and 20/21... If this is the case use point 2 from kymlp.

2)In you router there is a button called "Applications" (in Advanced tab). Add ports for DNS 323 FTP server to that page too.

3)Check if you are able to get to the router managment page from Internet ( use instructions from kymlp.) After that type following in Command line:
telnet your host name or wan IP address 21(or any other port you set up your FTP on) and hit Enter

it should come up with something like : 220 Data FTP server(Version wu-2.3.2) ....etc.

That means that you reached FTP server from the Internet.....

Offline

 

#7 2007-07-25 12:42:39

shadowandy
Member
From: Singapore
Registered: 2007-05-26
Posts: 89
Website

Re: ftp accessprob over internet

most likely the data control didn't get forwarded. What you can try is to edit /etc/ftpaccess directly and "pasv-allow all" is you are running on port 20 and 21. I got no problem access from the internet since.


SpeedStream 5660, DIR-655,  DNS-323, MLDonkey (DNS-323), DNS-343, DIR-300 Tips & Hacks

Offline

 

#8 2007-07-25 14:15:44

kmick
New member
Registered: 2007-07-25
Posts: 2

Re: ftp accessprob over internet

How do you do this
"Set your external port to something like 8821 on the WAN side, natting to port 21 on the LAN side. Then you ftp xxx.yyy.zzz.vvv:8821 to get to the alternate port."

specifically the 'natting to port 21 on the lan side'

Offline

 

#9 2007-07-25 14:52:07

kymlp
Member
From: Melbourne, Australia
Registered: 2007-05-28
Posts: 17

Re: ftp accessprob over internet

kmick ... in your router there is usually something like "virtual server" (dlink terminology) which says "private ip", "private port", "public port". What this is doing is saying that your router, when it receives a port open on the public side, if there is a nat (network address translation) to a private ip and port, it will direct the traffic to that ip and port.   

For example you have an ftp server at say 192.168.111.100. Typically this will want ftp on port 21, so you say that this is your private part of the address translation. Now, you can choose any port number (up to ~65,000) as the public port that will translate to your private port - say 9945.  From the internet, your WAN address is something like 202.235.122.68. But for someone to get to port 21 at 192.168.111.100, they need to know (this is the security - you have to tell them) to open port 9945 at 202.235.122.68. The router will then 'route' the traffic to the right port and ip addy.

Normally you need to specify the non-standard port like this: 202.235.122.68:9945

I hope this makes sense ....  smile

Offline

 

#10 2007-07-25 14:58:20

audifreakje
Member
Registered: 2007-07-08
Posts: 9

Re: ftp accessprob over internet

I did some networking and indeed it seems that my ISP blocks all incoming traffic below ports 1024 coming from other ISPs.
So I will choose another incoming port to do the ftp exercise

Offline

 

#11 2007-07-25 15:03:50

kymlp
Member
From: Melbourne, Australia
Registered: 2007-05-28
Posts: 17

Re: ftp accessprob over internet

Seems like your ISP is trying to stop hackers from probing the common ports. A description can be found of the first 1024 ports (the common ports) at http://www.iana.org/assignments/port-numbers.

(I hope this is not off-topic too much!)

Offline

 

#12 2007-08-16 12:11:00

erostiff
Member
Registered: 2007-07-14
Posts: 30

Re: ftp accessprob over internet

audifreakje:
i'm guessing you are from Belgium and have Telenet as ISP, because it's exactly the same problem i am having. i already tried putting the ftp port on the dns above 1024, set the non-standard ftp port in the router at the same (high) port and forwarded the port to the dns. Didn't work and i'm guessing it never will with this ISP.
Ftp'ing externally did work when i was on the Telenet network...

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB