Network share over internet from one host to another - linux

Maybe it's a silly question or bad idea, but I want to realize it.
I need to share my drives from one host(Linux) to another over Internet and mount on dest host.
Both computers using different ISP's and under NAT(router).
Source host is Linux.
Dest host is Windows\Mac.
1st I tired NFS:
I opened 111 and 2049 on source PC to dest host on router. FS's were exported to dest host.
It didn't work. I guess, NFS is designed only for local networks.
2nd was SAMBA:
In configuration I commented under global section
network/hosts-related lines to make the shares open for all.
Ports 139 and 445 were opened, but no luck. Servers were not pingable during test, I don't know if it's important.
If you have any solutions,comments or suggestions to use other protocols, please reply.
Thanks in advance!

I did not hear about storage share over Internet, because the network flow and strategies are not controlled by you. Too many things are uncontrollable, if you really want to do that, I think you should confirm the below things before you do that:
1. Does the two host have individual Internet IP address? The two host should be pingable interactively.
2. Are the ports opened for the specific port you want to use? and also the firewall(hardware or software) allow the ports to go through. You can verify this by **telnet** command. `telnet host port`
In my opinion, both NFS and SAMBA work in application layer, they can work locally, and through Internet. But when in Internet, many things can not be controlled by ourselves in the network layer. And it is also not safe when used in Internet.

Both host do have individual IP's but not pingable. telnet was working for mentioned hosts in both directions. Yes I understand this could work slow or maybe won't work at all. I guess I need to find some NAS solution, but it would cost quite some money

Related

How can I connect to an IIS site being served on my computer from my iPad?

Both devices are connected to the same WiFi network.
I have set IIS bindings to allow connections to my IP:
However, my computer's IP address is the same as my iPad's.
Is there a way to make this work?
That's not your IP. Every time you use a laptop on a Wifi network, you'll be using the public IP address of whatever network you're on.
The IP address of "your" computer doesn't belong to your computer. It belongs to the network you're connected to. Your computer is just borrowing it for a while.
Try to set a static IP address for your computer and use another machine to send ping command to it. Then use iPad to connect.
Initially when I posted this question, I was using an xfinitywifi hotspot and I assume that came with a whole host of problems. Full-disclosure, I did not figure out how to make it work in this scenario.
However when I moved to my own home wifi network, I was still having this problem.
I had to do two things, one of which, I know is not recommended, but it was really easy.
First, I had to enter my network and sharing center and set my connection as home connection instead of public which is what I previously had it at.
Second, which is not recommended, I turned off Windows firewall. I only do this when I need to access my site from another device for debugging. I turn it back on when I am done. For a more permanent setup I know it is recommended to just enable the port you need, but I could not figure this out.

Security threats with private server hosting

Ok, been hosting a few games servers on my home computer, and am now also setting up a personal ftp server.
I am sharing my ip-adress with some friends and family with intetions of using this server, but when one of my friends threatened "hacking" my computer (I know he doesn't possess any such skills). It got me thinking.
If I do not reveal my ip address to strangers (or even if I do), are there any security threats.
Also at what scale are these threats. Will an every day programmer be able to cause damage while I host this server?
P.S. I am using xlight ftp software to host this server.
Your friends are not the ones you have to concern about.
Your ip , like everyone else, will be scanned in several ports several times per minute.
Internet is full of bots, launching petitions, looking for holes to exploit and systems to
dig in.
Just be sure to be behind a firewall, nat only desired services ports, and try not to use a conventional one. Install an additional software firewall if possible.
I would also recommend you to use a SFTP server. (Based on SSH and encryped). Standard FTP traffic is raw and can be easily sniffed.

Use External URL to point to Local Server, Locally

I want to be able to access my raspberry pi locally using the dynamic dns name I have setup but I am having some trouble.
Example:
pi.domain.com - this can be accessed from outside the network fine, it updates the IP dynamically etc.
When accessing pi.domain.com from inside my local network, the same one the RPi is on, I cant do it (timeout).
If I use raspberrypi/ or 192.168.1.72 I can access it from my network internally, :22 access etc.
My question is: would it be possible to configure something so that when I am local to the RPi, I can use pi.domain.com and it will resolve to raspberrypi/?
Thanks,
Adam
Pretty simple solution I'm afraid. All I did was port forward :80 to my RPi in my routers settings, boom. Thought it would be a bit harder than that... I won't delete this just encase anyone else doing the same comes across this.
I thought that as the Pi was in the routers DMZ it would have done this automatically... oh well!

NFS mounts failing if FIREHOL firewall started

I am trying to setup NFS mounts between two machines on the same local network, however it seems I need to be more specific in my firewall (FIREHOL) setup as the client side cannot mount the exports.
Did look at netstat to determine the ports that open up, but they seems to be non-static/changing.
I know it is firewall related as disabled/stopping my Firehol causes the problem to dissapear.
Any specific areas I should investigate?
Well, first of all, you need to make sure that portmap is also enabled in your Firehol configuration.
I am not super sure about the low level workings of NFS's ports, but it does not use the same ports everytime.
You could do something like the following to enable the NFS ports, as well as portmap. (Check rpcinfo -p)
This would enable the rpc queries (to determine the ports, for the firewall, to know AFTER NFS was started(or restarted))
I also suggest the use of 'src' to restrict the client IP's you are serving to, if you don't already have it :)
Lastly, remember to restart the firewall/firehol AFTER nfs restarts, so rpcqueries are happy with the ports for nfs service.
Example (where 192.168.152.176 is your client machine)
server portmap accept src 192.168.152.176
server nfs accept src 192.168.152.176

How can I develop using a local VM server without using URLs with ports in them?

I'm setting up a linux server in a VM for my development.
Previously I've had PHP, MySQL etc etc all installed locally on my Mac. Apart from being a security risk, it's a drag to maintain and keep up to date, and there's a risk that an OS upgrade will wipe part of your setup out as the changes you make are fairly non-standard.
Having the entire server contained within a VM makes it easily upgradable and portable between machines. It means I can have the same configuration as the destination server and with shared folders even if the VM gets corrupted my work is safe on the host machine.
Previously with the local installation I was able to develop on convenient URLs like http://site.dev. I'd quite like to carry this over to the VM way of development but I'm struggling to figure out how, if it's possible at all.
Here's the problem:
In Bridged mode, the VM is part of the same network as the host. This is great but I can't choose a fixed IP address as I may be joining other networks and that address may be taken already. I'd like a consistent way of addressing my VM.
In NAT mode I can't directly address the VM without using port forwarding. I can use http://site.dev if I use the hosts file to forward that to localhost and then localhost:8080 forwards to the vm:80. The trouble is I have to access http://site.dev:8080 which is inconvenient for URL construction.
Does anyone know a way around this? I'm using ubuntu server and virtualbox.
Thanks!
The answer is to define a separate host-only network adapter and use that for host->guest communication.
You can do this by powering down the guest and adding the adapter in the VM settings. Once that's done you can boot the guest again and configure the new network interface however suits you best. I chose a fixed IP address in an unused range.

Resources