How do I share samba via Open VPN? Is that possible?
I have configured open VPN in my home so that it can be accessible from my office easily.
Now I want to share samba via my open VPN. How can I share samba over open VPN between Ubuntu and Windows?
Home public IP: HHH.OOO.MMM.EEE
Home desktop IP: 192.168.10.10
Office public IP: OOO:FFF:III:CCC
Office Windows desktop IP: 192.168.1.10
networking server samba vpn openvpn
add a comment |
I have configured open VPN in my home so that it can be accessible from my office easily.
Now I want to share samba via my open VPN. How can I share samba over open VPN between Ubuntu and Windows?
Home public IP: HHH.OOO.MMM.EEE
Home desktop IP: 192.168.10.10
Office public IP: OOO:FFF:III:CCC
Office Windows desktop IP: 192.168.1.10
networking server samba vpn openvpn
add a comment |
I have configured open VPN in my home so that it can be accessible from my office easily.
Now I want to share samba via my open VPN. How can I share samba over open VPN between Ubuntu and Windows?
Home public IP: HHH.OOO.MMM.EEE
Home desktop IP: 192.168.10.10
Office public IP: OOO:FFF:III:CCC
Office Windows desktop IP: 192.168.1.10
networking server samba vpn openvpn
I have configured open VPN in my home so that it can be accessible from my office easily.
Now I want to share samba via my open VPN. How can I share samba over open VPN between Ubuntu and Windows?
Home public IP: HHH.OOO.MMM.EEE
Home desktop IP: 192.168.10.10
Office public IP: OOO:FFF:III:CCC
Office Windows desktop IP: 192.168.1.10
networking server samba vpn openvpn
networking server samba vpn openvpn
edited Feb 4 at 11:41
Matthias Braun
269310
269310
asked Mar 28 '16 at 12:06
Dinesh DhananjayanDinesh Dhananjayan
142226
142226
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
In short: Make sure that samba accepts connections from the VPN subnet.
In more detail (from the OpenVPN wiki):
Next, edit your Samba configuration file (smb.conf). Make sure the hosts allow directive will permit OpenVPN clients coming from the 10.8.0.0/24 subnet to connect. For example:
hosts allow = 10.66.0.0/24 10.8.0.0/24 127.0.0.1
If you are running the Samba and OpenVPN servers on the same machine, you may want to edit the interfaces directive in the smb.conf file to also listen on the TUN interface subnet of 10.8.0.0/24:
interfaces = 10.66.0.0/24 10.8.0.0/24
If you are running the Samba and OpenVPN servers on the same machine, connect from an OpenVPN client to a Samba share using the folder name:
\10.8.0.1\sharename
(10.66.0.0 is the home subnet in their example, 10.8.0.0 is the VPN subnet)
Afterwards, restart the samba service to take the new configuration into account:
sudo service smbd restart
1
While its less security minded, since the entire 10.*.*.* network is private, I just use "hosts allow = 10.", this allows all hosts from any 10.*.*.* network.
– FreeSoftwareServers
Apr 16 '16 at 21:45
add a comment |
This applies if your remote VPN is running on a different computer than the SMB share.
I think that what you want is the following to your OpenVPN config file.
push "route 192.168.1.0 255.255.255.0"
This allows your remote computer to see the rest of the Remote 192.168.1.* network, if you don't have this line, then it will only be able to access remote resources on the computer running the VPN server.
Here is my guide which includes a few other configs I make related to IPTables and UFW.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f751034%2fhow-do-i-share-samba-via-open-vpn-is-that-possible%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
In short: Make sure that samba accepts connections from the VPN subnet.
In more detail (from the OpenVPN wiki):
Next, edit your Samba configuration file (smb.conf). Make sure the hosts allow directive will permit OpenVPN clients coming from the 10.8.0.0/24 subnet to connect. For example:
hosts allow = 10.66.0.0/24 10.8.0.0/24 127.0.0.1
If you are running the Samba and OpenVPN servers on the same machine, you may want to edit the interfaces directive in the smb.conf file to also listen on the TUN interface subnet of 10.8.0.0/24:
interfaces = 10.66.0.0/24 10.8.0.0/24
If you are running the Samba and OpenVPN servers on the same machine, connect from an OpenVPN client to a Samba share using the folder name:
\10.8.0.1\sharename
(10.66.0.0 is the home subnet in their example, 10.8.0.0 is the VPN subnet)
Afterwards, restart the samba service to take the new configuration into account:
sudo service smbd restart
1
While its less security minded, since the entire 10.*.*.* network is private, I just use "hosts allow = 10.", this allows all hosts from any 10.*.*.* network.
– FreeSoftwareServers
Apr 16 '16 at 21:45
add a comment |
In short: Make sure that samba accepts connections from the VPN subnet.
In more detail (from the OpenVPN wiki):
Next, edit your Samba configuration file (smb.conf). Make sure the hosts allow directive will permit OpenVPN clients coming from the 10.8.0.0/24 subnet to connect. For example:
hosts allow = 10.66.0.0/24 10.8.0.0/24 127.0.0.1
If you are running the Samba and OpenVPN servers on the same machine, you may want to edit the interfaces directive in the smb.conf file to also listen on the TUN interface subnet of 10.8.0.0/24:
interfaces = 10.66.0.0/24 10.8.0.0/24
If you are running the Samba and OpenVPN servers on the same machine, connect from an OpenVPN client to a Samba share using the folder name:
\10.8.0.1\sharename
(10.66.0.0 is the home subnet in their example, 10.8.0.0 is the VPN subnet)
Afterwards, restart the samba service to take the new configuration into account:
sudo service smbd restart
1
While its less security minded, since the entire 10.*.*.* network is private, I just use "hosts allow = 10.", this allows all hosts from any 10.*.*.* network.
– FreeSoftwareServers
Apr 16 '16 at 21:45
add a comment |
In short: Make sure that samba accepts connections from the VPN subnet.
In more detail (from the OpenVPN wiki):
Next, edit your Samba configuration file (smb.conf). Make sure the hosts allow directive will permit OpenVPN clients coming from the 10.8.0.0/24 subnet to connect. For example:
hosts allow = 10.66.0.0/24 10.8.0.0/24 127.0.0.1
If you are running the Samba and OpenVPN servers on the same machine, you may want to edit the interfaces directive in the smb.conf file to also listen on the TUN interface subnet of 10.8.0.0/24:
interfaces = 10.66.0.0/24 10.8.0.0/24
If you are running the Samba and OpenVPN servers on the same machine, connect from an OpenVPN client to a Samba share using the folder name:
\10.8.0.1\sharename
(10.66.0.0 is the home subnet in their example, 10.8.0.0 is the VPN subnet)
Afterwards, restart the samba service to take the new configuration into account:
sudo service smbd restart
In short: Make sure that samba accepts connections from the VPN subnet.
In more detail (from the OpenVPN wiki):
Next, edit your Samba configuration file (smb.conf). Make sure the hosts allow directive will permit OpenVPN clients coming from the 10.8.0.0/24 subnet to connect. For example:
hosts allow = 10.66.0.0/24 10.8.0.0/24 127.0.0.1
If you are running the Samba and OpenVPN servers on the same machine, you may want to edit the interfaces directive in the smb.conf file to also listen on the TUN interface subnet of 10.8.0.0/24:
interfaces = 10.66.0.0/24 10.8.0.0/24
If you are running the Samba and OpenVPN servers on the same machine, connect from an OpenVPN client to a Samba share using the folder name:
\10.8.0.1\sharename
(10.66.0.0 is the home subnet in their example, 10.8.0.0 is the VPN subnet)
Afterwards, restart the samba service to take the new configuration into account:
sudo service smbd restart
edited Mar 29 '16 at 9:28
kos
25.9k871121
25.9k871121
answered Mar 29 '16 at 6:10
HenningHenning
561
561
1
While its less security minded, since the entire 10.*.*.* network is private, I just use "hosts allow = 10.", this allows all hosts from any 10.*.*.* network.
– FreeSoftwareServers
Apr 16 '16 at 21:45
add a comment |
1
While its less security minded, since the entire 10.*.*.* network is private, I just use "hosts allow = 10.", this allows all hosts from any 10.*.*.* network.
– FreeSoftwareServers
Apr 16 '16 at 21:45
1
1
While its less security minded, since the entire 10.*.*.* network is private, I just use "hosts allow = 10.", this allows all hosts from any 10.*.*.* network.
– FreeSoftwareServers
Apr 16 '16 at 21:45
While its less security minded, since the entire 10.*.*.* network is private, I just use "hosts allow = 10.", this allows all hosts from any 10.*.*.* network.
– FreeSoftwareServers
Apr 16 '16 at 21:45
add a comment |
This applies if your remote VPN is running on a different computer than the SMB share.
I think that what you want is the following to your OpenVPN config file.
push "route 192.168.1.0 255.255.255.0"
This allows your remote computer to see the rest of the Remote 192.168.1.* network, if you don't have this line, then it will only be able to access remote resources on the computer running the VPN server.
Here is my guide which includes a few other configs I make related to IPTables and UFW.
add a comment |
This applies if your remote VPN is running on a different computer than the SMB share.
I think that what you want is the following to your OpenVPN config file.
push "route 192.168.1.0 255.255.255.0"
This allows your remote computer to see the rest of the Remote 192.168.1.* network, if you don't have this line, then it will only be able to access remote resources on the computer running the VPN server.
Here is my guide which includes a few other configs I make related to IPTables and UFW.
add a comment |
This applies if your remote VPN is running on a different computer than the SMB share.
I think that what you want is the following to your OpenVPN config file.
push "route 192.168.1.0 255.255.255.0"
This allows your remote computer to see the rest of the Remote 192.168.1.* network, if you don't have this line, then it will only be able to access remote resources on the computer running the VPN server.
Here is my guide which includes a few other configs I make related to IPTables and UFW.
This applies if your remote VPN is running on a different computer than the SMB share.
I think that what you want is the following to your OpenVPN config file.
push "route 192.168.1.0 255.255.255.0"
This allows your remote computer to see the rest of the Remote 192.168.1.* network, if you don't have this line, then it will only be able to access remote resources on the computer running the VPN server.
Here is my guide which includes a few other configs I make related to IPTables and UFW.
answered Apr 16 '16 at 21:38
FreeSoftwareServersFreeSoftwareServers
7411721
7411721
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f751034%2fhow-do-i-share-samba-via-open-vpn-is-that-possible%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown