LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Network configuration for LAN and WAN - DNS, port forwarding, etc. (https://www.linuxquestions.org/questions/slackware-14/network-configuration-for-lan-and-wan-dns-port-forwarding-etc-4175592556/)

glupa4e 10-31-2016 03:13 AM

Network configuration for LAN and WAN - DNS, port forwarding, etc.
 
Hello,

i have ftp server on my computer and an ftp client on my android phone. I am able to transfer files from the computer to the phone and vice versa. I am able to do that only in my LAN. I wondered if that could be possible also from WAN?

My internet connection is behind a router from my internet service provider. I have the password to configure it. I was told that that router was capable of doing VPN-connections.

So if i would like to be able to connect to my ftp server from WAN, do i need to enable port forwarding for the port 22 (SFTP)? How should i do it? On the router or on my computer where the ftp server is running?

One more question - the ftp-client in the LAN cannot access the ftp-server by its name, but only via IP-address. I guess i need to configure DNS-server somewhere in LAN. Where sould that be - on the router or on the computer where also the ftp-server runs?

bassmadrigal 10-31-2016 07:25 AM

To access your computers from outside your local network (ie, remotely from your phone when it isn't connected to wifi), you need for forward the port(s) for whatever service you want to use. By default, ssh uses port 22, but that can be changed for security reasons to a different port (most brute force logon attacks are attempted over port 22).

However, by just doing that, you'd need to know your IP address to be able to connect to it. Many ISPs will change that IP occasionally, so there's no guarantee it will be what it was last time. This is where dynamic DNS services come into play. These services can provide you a domain name and forward it to your IP. To ensure the service knows your local IP, you keep a small script on your computer that will occasionally check your IP and will update the IP the service uses when needed.

Personally, I use http://duckdns.org. They are a free service and allow like 4 different subdomains per account. The free services typically require you to use a subset of their name, so, mine is bassmadrigal.duckdns.org (I just have a blank page served by apache). They provide a linux script and cron command (or a GUI option, but I've never used that) to make updating the IP automatic whenever your computer is running.


All times are GMT -5. The time now is 11:38 PM.