# Trying to set up a FTP webserver with proftpd

## warriorness

I emerged proftpd and copied the proftpd.conf.sample file to proftpd.conf, and without any modifications, "/etc/init.d/proftpd start" gives this output:

```
* Starting proftpd

IPv4 getaddrinfo 'webserver' error: name or service not known

warning: unable to determine IP address of 'webserver'

error: No valid servers configured

fatal: error processing configuration file '/etc/proftpd/proftpd.conf'   [ !! ]
```

What's wrong? Or, what more information do I need to provide?

----------

## al

Follow the wiki:

http://gentoo-wiki.com/HOWTO_ProFTPD

----------

## warriorness

I did; see, otherwise I wouldn't have posted  :Very Happy: 

The box's internet works (although I haven't installed a GUI). It's on a school network by the way; the teacher wants it for a web design class.

----------

## Simplimus

I'm experiencing the same problem. I've been sitting here biting my nails for hours and cant get it to work. Would someone please help?

----------

## lukin-amd64

Edit:

```
/etc/host # with you host[/
```

----------

## Janne Pikkarainen

Show us the proftpd.conf.

----------

## wkugh

I had similar problem and solved it by added line into /etc/hosts

```

..

127.0.0.1 yourhostname.yourdomainname yourhostname localhost

..

```

----------

## Ast0r

The problem is that your hostname is not a FQDN. Either set the hostname to the FQDN of the box, or add the hostname that you are using to your hosts file. I would not recommend setting it to 127.0.0.1 as I'm pretty sure that the IP address that proftpd tries to use is the one that it gets on the host lookup.

You want to do

```
[your server's IP address] webserver
```

----------

## warriorness

 *Ast0r wrote:*   

> The problem is that your hostname is not a FQDN. Either set the hostname to the FQDN of the box, or add the hostname that you are using to your hosts file. I would not recommend setting it to 127.0.0.1 as I'm pretty sure that the IP address that proftpd tries to use is the one that it gets on the host lookup.
> 
> You want to do
> 
> ```
> ...

 

So instead of using 127.0.0.1 I should use the IP obtained by dhcpcd?

----------

## GoofballJM1

 *Quote:*   

> So instead of using 127.0.0.1 I should use the IP obtained by dhcpcd?

 

Yes.  Is there any reason you are setting up an FTP site using DHCP?  Are you referring to your public IP from your ISP?

Also, If you are behind a firewall and wish to access from outside your local network, add this line to your proftpd.conf

```
MasqueradeAddress   xx.xx.xx.xx (this is your WAN IP address from your ISP)
```

----------

## opentaka

 *warriorness wrote:*   

> 
> 
> So instead of using 127.0.0.1 I should use the IP obtained by dhcpcd?

 

you should only do that if you want to run your ftpd on localhost, not for public.

----------

