router trouble with FTP and web server

jimmyhaha

Platinum Member
Jan 7, 2001
2,851
0
0
set up my apache web server and serv-u ftp

HAVE problem to access it using WAN address
NO problem to access it using LAN address

I have NAT enabled in my router

Pls advice

thanks in advance...


 

AT

Senior member
Oct 9, 1999
388
0
0
Originally posted by: jimmyhaha
set up my apache web server and serv-u ftp

HAVE problem to access it using WAN address
NO problem to access it using WAN address

I have NAT enabled in my router

Ummm, I'll hazard a guess that there is a typo in your msg and you mean that you problem accessing it using WAN address and no problem using LAN address.

If so, you have to set up port forwarding on your router to forward ports 80 & 21 accessing your WAN address to your server LAN address. Refer to your router manual to see exactly how.
 

MichaelD

Lifer
Jan 16, 2001
31,528
3
76
Originally posted by: AT
Originally posted by: jimmyhaha
set up my apache web server and serv-u ftp

HAVE problem to access it using WAN address
NO problem to access it using WAN address

I have NAT enabled in my router

Ummm, I'll hazard a guess that there is a typo in your msg and you mean that you problem accessing it using WAN address and no problem using LAN address.

If so, you have to set up port forwarding on your router to forward ports 80 & 21 accessing your WAN address to your server LAN address. Refer to your router manual to see exactly how.


What he said AND you have tell the router where to forward those ports to. The actual process to do this varies from brand/model to brand/model, but basically you have to:

1. Reconfigure the filters on your router to FORWARD ports 21 & 80 instead of DROP them
2. Tell your router you want to forward all port 21 & 80 traffic to the IP of your server (internal IP assigned to the server box by either the router (DHCP) or yourself (whatever you numbered it.)

My setup at home has three boxes on a 4-port router. The router's IP is 192.168.0.1 (default) Box one (my main rig) is 192.168.0.2, server is 192.168.0.3 and my second rig is 192.168.0.4

I have my router set to forward all port 21 traffic to IP 192.168.0.3.

I hope this helps. I learned a lot of it the very hard, very frustrating way.
rolleye.gif

 

DanFungus

Diamond Member
Jul 27, 2001
5,857
0
0
Also, check to see if it's against the Agreement for your ISP, as they may block ports to stop yuo, even though you could change the port, and then just have to type the port in the URL...
 

Kadarin

Lifer
Nov 23, 2001
44,296
16
81
Originally posted by: jimmyhaha
set up my apache web server and serv-u ftp

HAVE problem to access it using WAN address
NO problem to access it using LAN address

I have NAT enabled in my router

Pls advice

thanks in advance...

In addition to what everyone else said, I'd like to add that you're not being specific enough. The ftp and the web servers are two different services, listening on two different tcp ports. While it does sound like a simple port forwarding problem, you should be aware that with ftp there are sometimes issues with some clients working through NAT. (Linksys used to and may still have a bug where Netscape 4 browser would not work as an ftp client connecting to a server behind the NAT.)
 

GigaCluster

Golden Member
Aug 12, 2001
1,762
0
0
Doing FTP through NAT is a bad experience... FTP is a very weird protocol because it requires two ports, 21 for control information and 20 for data, plus it requires dynamic ports... I don't know enough about FTP to differenciate between active mode and passive mode, so the dynamic ports may only be required in one of the modes.

So be sure to forward TWO ports for FTP instead of just one.
 

FUBAR

Senior member
Oct 11, 1999
618
0
0
Actually... you should only NEED one port for ftp if you are using a competant server... unlike proftpd (which I know is flamebait... check this section of the proFTPd faq if you need proof How to use passive mode)

A good server will be able to use the dynamic ports to use passive mode with only port 21 forwarded.
 

MichaelD

Lifer
Jan 16, 2001
31,528
3
76
Originally posted by: FUBAR
Actually... you should only NEED one port for ftp if you are using a competant server... unlike proftpd (which I know is flamebait... check this section of the proFTPd faq if you need proof How to use passive mode)

A good server will be able to use the dynamic ports to use passive mode with only port 21 forwarded.

I use GuildFTP and I only have port 21 forwarded. Works just fine. People can DL and UL from me.