Share Linux Folder over internet using Samba

Posted on 2006-05-31
Last Modified: 2010-05-18
Map a folder on Linux as a drive on windows xp pc.

I am running Linux  Fedora core 2 and have used Plesk to configure Samba.  on the linux server all seems to be working. The Linux server has a static IP with access to internet.  Samba seems to be running with shared directory and user showing up correctly.

1) what address do I enter in the folder field when using the Windows XP Explorer <tool><map Drive>.
Note: Most documents seems suggest using a name as if Samba can only be used with the same LAN.  But I need to figure out how to use across the internet without VPN.

2) Any other steps to complete the process.

3) Have you ever done this before?if yes what other problems have you encountered.

Question by:izad
    LVL 87

    Accepted Solution

    Without VPN, forget samba. Setup a FTP server on the linux box. That would be much faster and you don't have to open as many ports which can be used to attack your PC as in Samba.
    LVL 1

    Expert Comment

    I agree with rindi, don't use samba over the net without a VPN.

    It is likely your system is already running a SSH server which can accept SFTP and SCP protocols (on port 22).
    You can connect to this from your windows box using the winscp program:

    and this is more secure than ftp
    LVL 1

    Expert Comment

    I agree with rindi and rich on Samba.

    Moreover, for any mode of connection, if your Linux box is in ur private network, you still have to configure NAT/PAT so you can access your resources from Internet. Also note that you will have to have a static mapping in your Firewall which would map the Internet address/Port of your Linux Box to your Private IP and enable the firewall to accept connections from OUTSIDE. So, IT IS POSSIBLE to access your Linux Box from Internet. Only you need to do  some configurations in your Gateway/Firewall.

    I would suggest SSH server in your Linux Box with "SSH Secure Shell" client in your Win Box. With this client you have the advantage of both command line working like in Telnet as well as GUI based SFTP where you can just drag & drop to copy files.

    If you are looking to work on files residing on the Linux box (as in writing code) you can still do it using 'vim' or 'emacs' in the client.

    Hope this helps,
    Good Luck
    LVL 2

    Assisted Solution

    if you want to share folders over the internet, use apache.  Set it up with https, ( and add passwords in the apache config file

     <Directory /some/thing/>
            AuthType Basic
            AuthName "You Must Be 18 Years or Older (legal crap)"
            AuthUserFile /some/thing/.password

    THE PASSWORD FILE IS .password.  You must setup names and passwords.


    Here's the basics of password protecting a directory on your server.

    You'll need to create a password file. This file should be placed somewhere not accessible from the web. This is so that folks cannot download the password file. For example, if your documents are served out of /usr/local/apache/htdocs you might want to put the password file(s) in /usr/local/apache/passwd.

    To create the file, use the htpasswd utility that came with Apache. This will be located in the bin directory of wherever you installed Apache. To create the file, type:

    htpasswd -c /usr/local/apache/passwd/passwords rbowen

    htpasswd will ask you for the password, and then ask you to type it again to confirm it:

    # htpasswd -c /usr/local/apache/passwd/passwords rbowen
    New password: mypassword
    Re-type new password: mypassword
    Adding password for user rbowen


    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
    Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now