How do I add a port exception to an OpenVPN connection?











up vote
0
down vote

favorite












I want port 22 to remain untouched as I believe it to be secure enough for my purposes and I'd like to use it to sync files.










share|improve this question






















  • What are you trying to achieve, and what is your configuration?
    – vidarlo
    2 days ago










  • I'm using protonvpn. How can I get the information that you require? Would the contents of an *.ovpn file do it?
    – NonYaBidnezz
    2 days ago










  • Redacted, of course.
    – NonYaBidnezz
    2 days ago










  • Objective is to get both my machines on OpenVpn while still being able to sync files over ssh. SSH can take place over VPN or not. VPN is actually preferred. I use dynamic DNS. I'm assuming I'll have to script an update to that on startup or something. I'll worry about that later.
    – NonYaBidnezz
    2 days ago

















up vote
0
down vote

favorite












I want port 22 to remain untouched as I believe it to be secure enough for my purposes and I'd like to use it to sync files.










share|improve this question






















  • What are you trying to achieve, and what is your configuration?
    – vidarlo
    2 days ago










  • I'm using protonvpn. How can I get the information that you require? Would the contents of an *.ovpn file do it?
    – NonYaBidnezz
    2 days ago










  • Redacted, of course.
    – NonYaBidnezz
    2 days ago










  • Objective is to get both my machines on OpenVpn while still being able to sync files over ssh. SSH can take place over VPN or not. VPN is actually preferred. I use dynamic DNS. I'm assuming I'll have to script an update to that on startup or something. I'll worry about that later.
    – NonYaBidnezz
    2 days ago















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I want port 22 to remain untouched as I believe it to be secure enough for my purposes and I'd like to use it to sync files.










share|improve this question













I want port 22 to remain untouched as I believe it to be secure enough for my purposes and I'd like to use it to sync files.







ssh openvpn






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 2 days ago









NonYaBidnezz

226




226












  • What are you trying to achieve, and what is your configuration?
    – vidarlo
    2 days ago










  • I'm using protonvpn. How can I get the information that you require? Would the contents of an *.ovpn file do it?
    – NonYaBidnezz
    2 days ago










  • Redacted, of course.
    – NonYaBidnezz
    2 days ago










  • Objective is to get both my machines on OpenVpn while still being able to sync files over ssh. SSH can take place over VPN or not. VPN is actually preferred. I use dynamic DNS. I'm assuming I'll have to script an update to that on startup or something. I'll worry about that later.
    – NonYaBidnezz
    2 days ago




















  • What are you trying to achieve, and what is your configuration?
    – vidarlo
    2 days ago










  • I'm using protonvpn. How can I get the information that you require? Would the contents of an *.ovpn file do it?
    – NonYaBidnezz
    2 days ago










  • Redacted, of course.
    – NonYaBidnezz
    2 days ago










  • Objective is to get both my machines on OpenVpn while still being able to sync files over ssh. SSH can take place over VPN or not. VPN is actually preferred. I use dynamic DNS. I'm assuming I'll have to script an update to that on startup or something. I'll worry about that later.
    – NonYaBidnezz
    2 days ago


















What are you trying to achieve, and what is your configuration?
– vidarlo
2 days ago




What are you trying to achieve, and what is your configuration?
– vidarlo
2 days ago












I'm using protonvpn. How can I get the information that you require? Would the contents of an *.ovpn file do it?
– NonYaBidnezz
2 days ago




I'm using protonvpn. How can I get the information that you require? Would the contents of an *.ovpn file do it?
– NonYaBidnezz
2 days ago












Redacted, of course.
– NonYaBidnezz
2 days ago




Redacted, of course.
– NonYaBidnezz
2 days ago












Objective is to get both my machines on OpenVpn while still being able to sync files over ssh. SSH can take place over VPN or not. VPN is actually preferred. I use dynamic DNS. I'm assuming I'll have to script an update to that on startup or something. I'll worry about that later.
– NonYaBidnezz
2 days ago






Objective is to get both my machines on OpenVpn while still being able to sync files over ssh. SSH can take place over VPN or not. VPN is actually preferred. I use dynamic DNS. I'm assuming I'll have to script an update to that on startup or something. I'll worry about that later.
– NonYaBidnezz
2 days ago












1 Answer
1






active

oldest

votes

















up vote
0
down vote













In short there's two ways to accomplish this.



Over VPN



In this case, your VPN provider has to allow incoming traffic to port 22 on your VPN link, or you have to set up SSH to use an port that allows incoming traffic. How to do this differs from provider to provider, but most do tend to use RFC1918-addressing with optional port forwarding. In case of port forwarding you typically don't get to pick the port.



Bypassing VPN



You can't create routes that involves port numbers, but that should not be necessary.



Simply make sure that you still have a valid route to reach the host you're trying to reach outside of the VPN route. This can be a /32, i.e. a route only to the host you're sshing from.



In addition, if you have set up a firewall, you must allow ssh on that interface.



Without any more detailed configuration from you, this is the answer that's possible to give. You'll have to fill in the details yourself.






share|improve this answer





















  • In retrospect, I will need to bypass to prevent providing clues I don't want to provide through Dynamic DNS.
    – NonYaBidnezz
    yesterday











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',
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
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1093748%2fhow-do-i-add-a-port-exception-to-an-openvpn-connection%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













In short there's two ways to accomplish this.



Over VPN



In this case, your VPN provider has to allow incoming traffic to port 22 on your VPN link, or you have to set up SSH to use an port that allows incoming traffic. How to do this differs from provider to provider, but most do tend to use RFC1918-addressing with optional port forwarding. In case of port forwarding you typically don't get to pick the port.



Bypassing VPN



You can't create routes that involves port numbers, but that should not be necessary.



Simply make sure that you still have a valid route to reach the host you're trying to reach outside of the VPN route. This can be a /32, i.e. a route only to the host you're sshing from.



In addition, if you have set up a firewall, you must allow ssh on that interface.



Without any more detailed configuration from you, this is the answer that's possible to give. You'll have to fill in the details yourself.






share|improve this answer





















  • In retrospect, I will need to bypass to prevent providing clues I don't want to provide through Dynamic DNS.
    – NonYaBidnezz
    yesterday















up vote
0
down vote













In short there's two ways to accomplish this.



Over VPN



In this case, your VPN provider has to allow incoming traffic to port 22 on your VPN link, or you have to set up SSH to use an port that allows incoming traffic. How to do this differs from provider to provider, but most do tend to use RFC1918-addressing with optional port forwarding. In case of port forwarding you typically don't get to pick the port.



Bypassing VPN



You can't create routes that involves port numbers, but that should not be necessary.



Simply make sure that you still have a valid route to reach the host you're trying to reach outside of the VPN route. This can be a /32, i.e. a route only to the host you're sshing from.



In addition, if you have set up a firewall, you must allow ssh on that interface.



Without any more detailed configuration from you, this is the answer that's possible to give. You'll have to fill in the details yourself.






share|improve this answer





















  • In retrospect, I will need to bypass to prevent providing clues I don't want to provide through Dynamic DNS.
    – NonYaBidnezz
    yesterday













up vote
0
down vote










up vote
0
down vote









In short there's two ways to accomplish this.



Over VPN



In this case, your VPN provider has to allow incoming traffic to port 22 on your VPN link, or you have to set up SSH to use an port that allows incoming traffic. How to do this differs from provider to provider, but most do tend to use RFC1918-addressing with optional port forwarding. In case of port forwarding you typically don't get to pick the port.



Bypassing VPN



You can't create routes that involves port numbers, but that should not be necessary.



Simply make sure that you still have a valid route to reach the host you're trying to reach outside of the VPN route. This can be a /32, i.e. a route only to the host you're sshing from.



In addition, if you have set up a firewall, you must allow ssh on that interface.



Without any more detailed configuration from you, this is the answer that's possible to give. You'll have to fill in the details yourself.






share|improve this answer












In short there's two ways to accomplish this.



Over VPN



In this case, your VPN provider has to allow incoming traffic to port 22 on your VPN link, or you have to set up SSH to use an port that allows incoming traffic. How to do this differs from provider to provider, but most do tend to use RFC1918-addressing with optional port forwarding. In case of port forwarding you typically don't get to pick the port.



Bypassing VPN



You can't create routes that involves port numbers, but that should not be necessary.



Simply make sure that you still have a valid route to reach the host you're trying to reach outside of the VPN route. This can be a /32, i.e. a route only to the host you're sshing from.



In addition, if you have set up a firewall, you must allow ssh on that interface.



Without any more detailed configuration from you, this is the answer that's possible to give. You'll have to fill in the details yourself.







share|improve this answer












share|improve this answer



share|improve this answer










answered yesterday









vidarlo

7,99042341




7,99042341












  • In retrospect, I will need to bypass to prevent providing clues I don't want to provide through Dynamic DNS.
    – NonYaBidnezz
    yesterday


















  • In retrospect, I will need to bypass to prevent providing clues I don't want to provide through Dynamic DNS.
    – NonYaBidnezz
    yesterday
















In retrospect, I will need to bypass to prevent providing clues I don't want to provide through Dynamic DNS.
– NonYaBidnezz
yesterday




In retrospect, I will need to bypass to prevent providing clues I don't want to provide through Dynamic DNS.
– NonYaBidnezz
yesterday


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1093748%2fhow-do-i-add-a-port-exception-to-an-openvpn-connection%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

 ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕