LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Samba & IPTABLES & Network Drives Oh My! (https://www.linuxquestions.org/questions/linux-networking-3/samba-and-iptables-and-network-drives-oh-my-189083/)

logicdisaster 06-02-2004 10:37 PM

Samba & IPTABLES & Network Drives Oh My!
 
I have samba running under RH9 and i had a little trouble mapping the drive on my windows xp boxes only to find out it was because the iptables on the rh9 machine were blocking me. So i turned off iptables and now i have no problem connecting to the samba drive. My question is how can i set up iptables to allow only certain computers. And also does anyone know if theres a way that someone outside of my firewall like a friend could connect to my samba drive as one of their network drives. I wanna have it as a file server.

micxz 06-03-2004 01:44 AM

First off you don't want to allow access to samba from the internet. I would block everything you don't use, turn your firewall back on. And run SSH for your friends to get the files they need. As for your internal network (you have two nic cards right?) you should allow your computers IP with something like:

iptables -A INPUT -i eth0 -s xx.xx.xx.xx -j ACCEPT

DavidPhillips 06-03-2004 02:15 AM

For a file server over the internet you need to use ftp or http for public use, download only.
For private use and uploads you could use secure http to share files.

You can also use sftp for upload and download which is secure. A user would have access to there files with sftp, you could also setup a shared area for certain groups. sftp comes with the ssh app that's already on most linux systems and also comes with putty for win32.

As an alternative check openvpn. With openvpn you will need to configure all of the systems.

With a solution like https, or sftp you just setup the server and users will be able to login. Any machine should be able to use https, and Putty's sftp (psftp.exe) could easily be run from a simple download from any windows machine.


logicdisaster 06-03-2004 06:07 PM

thanks i figured out probably the best way for me to do this is to just have my local network use samba so i can map the network drive but for my friends i just told them to download winscp. Everything seems to work fine this way.

Thanks alot for the help.


All times are GMT -5. The time now is 01:34 AM.