FTP via intermediary computer or network binding?
Linux Server 18.04 installed vsftpd as my FTP server. This machine is also running openVPN, but when VPNs tun0 is active obviously my IP changes. Is there anyway i can route FTP traffic to connect to another machine on my network and direct it to the server like when i ssh via a jumpbox, or is there anyway to bind vsftpd to use my actual network and ignore tun0?
linux vpn ftp
add a comment |
Linux Server 18.04 installed vsftpd as my FTP server. This machine is also running openVPN, but when VPNs tun0 is active obviously my IP changes. Is there anyway i can route FTP traffic to connect to another machine on my network and direct it to the server like when i ssh via a jumpbox, or is there anyway to bind vsftpd to use my actual network and ignore tun0?
linux vpn ftp
(1) Don't think in terms of "my IP". It's not a single one. Each network interface has an IP (or possibly several). (2) What you have is a routing problem, where you distinguish between FTP traffic and the rest. You can do this with (3)iptablesand connection tracking, or, simpler, (4) create a network namespace, and runvsftpdin the namespace wheretun0and associated routing rules are not visible.
– dirkt
Jan 20 at 12:28
Let's assume I have no idea how to do any of that.....
– zerikscythe
Jan 21 at 0:26
If you have no idea how to do anything of that, please read up on networking basics, routing, network namespaces, andiptables. And plan some time for that. I could give a step-by-step description, but very likely it won't work in your particular configuration, and without understanding what is happening, you won't be able to debug it and make it work. Here is a related question about a bridged network namespace, if you want to experiment with namespaces.
– dirkt
Jan 21 at 6:52
OK, so following a tut on creating namespaces i have done such ns1, i can now load a program in the namespace, to only see 1 interface device of which i have 2. eth0 & tun0. loading a service seems to work just fine, and if tun0 is removed say by killing the vpn service my program does indeed drop... however it somehow rebinds to eth0 after about 45 seconds... why? i though when i created the v-link to tun0 and added the iptable Allow/Rejects eth0 should in theory be "invisible"...
– zerikscythe
Jan 21 at 9:43
i did this step by step only dff is where the code says eth0 i replaced it with tun0 blogs.igalia.com/dpino/2016/04/10/network-namespaces
– zerikscythe
Jan 21 at 9:48
add a comment |
Linux Server 18.04 installed vsftpd as my FTP server. This machine is also running openVPN, but when VPNs tun0 is active obviously my IP changes. Is there anyway i can route FTP traffic to connect to another machine on my network and direct it to the server like when i ssh via a jumpbox, or is there anyway to bind vsftpd to use my actual network and ignore tun0?
linux vpn ftp
Linux Server 18.04 installed vsftpd as my FTP server. This machine is also running openVPN, but when VPNs tun0 is active obviously my IP changes. Is there anyway i can route FTP traffic to connect to another machine on my network and direct it to the server like when i ssh via a jumpbox, or is there anyway to bind vsftpd to use my actual network and ignore tun0?
linux vpn ftp
linux vpn ftp
asked Jan 20 at 9:58
zerikscythezerikscythe
1
1
(1) Don't think in terms of "my IP". It's not a single one. Each network interface has an IP (or possibly several). (2) What you have is a routing problem, where you distinguish between FTP traffic and the rest. You can do this with (3)iptablesand connection tracking, or, simpler, (4) create a network namespace, and runvsftpdin the namespace wheretun0and associated routing rules are not visible.
– dirkt
Jan 20 at 12:28
Let's assume I have no idea how to do any of that.....
– zerikscythe
Jan 21 at 0:26
If you have no idea how to do anything of that, please read up on networking basics, routing, network namespaces, andiptables. And plan some time for that. I could give a step-by-step description, but very likely it won't work in your particular configuration, and without understanding what is happening, you won't be able to debug it and make it work. Here is a related question about a bridged network namespace, if you want to experiment with namespaces.
– dirkt
Jan 21 at 6:52
OK, so following a tut on creating namespaces i have done such ns1, i can now load a program in the namespace, to only see 1 interface device of which i have 2. eth0 & tun0. loading a service seems to work just fine, and if tun0 is removed say by killing the vpn service my program does indeed drop... however it somehow rebinds to eth0 after about 45 seconds... why? i though when i created the v-link to tun0 and added the iptable Allow/Rejects eth0 should in theory be "invisible"...
– zerikscythe
Jan 21 at 9:43
i did this step by step only dff is where the code says eth0 i replaced it with tun0 blogs.igalia.com/dpino/2016/04/10/network-namespaces
– zerikscythe
Jan 21 at 9:48
add a comment |
(1) Don't think in terms of "my IP". It's not a single one. Each network interface has an IP (or possibly several). (2) What you have is a routing problem, where you distinguish between FTP traffic and the rest. You can do this with (3)iptablesand connection tracking, or, simpler, (4) create a network namespace, and runvsftpdin the namespace wheretun0and associated routing rules are not visible.
– dirkt
Jan 20 at 12:28
Let's assume I have no idea how to do any of that.....
– zerikscythe
Jan 21 at 0:26
If you have no idea how to do anything of that, please read up on networking basics, routing, network namespaces, andiptables. And plan some time for that. I could give a step-by-step description, but very likely it won't work in your particular configuration, and without understanding what is happening, you won't be able to debug it and make it work. Here is a related question about a bridged network namespace, if you want to experiment with namespaces.
– dirkt
Jan 21 at 6:52
OK, so following a tut on creating namespaces i have done such ns1, i can now load a program in the namespace, to only see 1 interface device of which i have 2. eth0 & tun0. loading a service seems to work just fine, and if tun0 is removed say by killing the vpn service my program does indeed drop... however it somehow rebinds to eth0 after about 45 seconds... why? i though when i created the v-link to tun0 and added the iptable Allow/Rejects eth0 should in theory be "invisible"...
– zerikscythe
Jan 21 at 9:43
i did this step by step only dff is where the code says eth0 i replaced it with tun0 blogs.igalia.com/dpino/2016/04/10/network-namespaces
– zerikscythe
Jan 21 at 9:48
(1) Don't think in terms of "my IP". It's not a single one. Each network interface has an IP (or possibly several). (2) What you have is a routing problem, where you distinguish between FTP traffic and the rest. You can do this with (3)
iptables and connection tracking, or, simpler, (4) create a network namespace, and run vsftpd in the namespace where tun0 and associated routing rules are not visible.– dirkt
Jan 20 at 12:28
(1) Don't think in terms of "my IP". It's not a single one. Each network interface has an IP (or possibly several). (2) What you have is a routing problem, where you distinguish between FTP traffic and the rest. You can do this with (3)
iptables and connection tracking, or, simpler, (4) create a network namespace, and run vsftpd in the namespace where tun0 and associated routing rules are not visible.– dirkt
Jan 20 at 12:28
Let's assume I have no idea how to do any of that.....
– zerikscythe
Jan 21 at 0:26
Let's assume I have no idea how to do any of that.....
– zerikscythe
Jan 21 at 0:26
If you have no idea how to do anything of that, please read up on networking basics, routing, network namespaces, and
iptables. And plan some time for that. I could give a step-by-step description, but very likely it won't work in your particular configuration, and without understanding what is happening, you won't be able to debug it and make it work. Here is a related question about a bridged network namespace, if you want to experiment with namespaces.– dirkt
Jan 21 at 6:52
If you have no idea how to do anything of that, please read up on networking basics, routing, network namespaces, and
iptables. And plan some time for that. I could give a step-by-step description, but very likely it won't work in your particular configuration, and without understanding what is happening, you won't be able to debug it and make it work. Here is a related question about a bridged network namespace, if you want to experiment with namespaces.– dirkt
Jan 21 at 6:52
OK, so following a tut on creating namespaces i have done such ns1, i can now load a program in the namespace, to only see 1 interface device of which i have 2. eth0 & tun0. loading a service seems to work just fine, and if tun0 is removed say by killing the vpn service my program does indeed drop... however it somehow rebinds to eth0 after about 45 seconds... why? i though when i created the v-link to tun0 and added the iptable Allow/Rejects eth0 should in theory be "invisible"...
– zerikscythe
Jan 21 at 9:43
OK, so following a tut on creating namespaces i have done such ns1, i can now load a program in the namespace, to only see 1 interface device of which i have 2. eth0 & tun0. loading a service seems to work just fine, and if tun0 is removed say by killing the vpn service my program does indeed drop... however it somehow rebinds to eth0 after about 45 seconds... why? i though when i created the v-link to tun0 and added the iptable Allow/Rejects eth0 should in theory be "invisible"...
– zerikscythe
Jan 21 at 9:43
i did this step by step only dff is where the code says eth0 i replaced it with tun0 blogs.igalia.com/dpino/2016/04/10/network-namespaces
– zerikscythe
Jan 21 at 9:48
i did this step by step only dff is where the code says eth0 i replaced it with tun0 blogs.igalia.com/dpino/2016/04/10/network-namespaces
– zerikscythe
Jan 21 at 9:48
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
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%2fsuperuser.com%2fquestions%2f1396262%2fftp-via-intermediary-computer-or-network-binding%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Super User!
- 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%2fsuperuser.com%2fquestions%2f1396262%2fftp-via-intermediary-computer-or-network-binding%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
(1) Don't think in terms of "my IP". It's not a single one. Each network interface has an IP (or possibly several). (2) What you have is a routing problem, where you distinguish between FTP traffic and the rest. You can do this with (3)
iptablesand connection tracking, or, simpler, (4) create a network namespace, and runvsftpdin the namespace wheretun0and associated routing rules are not visible.– dirkt
Jan 20 at 12:28
Let's assume I have no idea how to do any of that.....
– zerikscythe
Jan 21 at 0:26
If you have no idea how to do anything of that, please read up on networking basics, routing, network namespaces, and
iptables. And plan some time for that. I could give a step-by-step description, but very likely it won't work in your particular configuration, and without understanding what is happening, you won't be able to debug it and make it work. Here is a related question about a bridged network namespace, if you want to experiment with namespaces.– dirkt
Jan 21 at 6:52
OK, so following a tut on creating namespaces i have done such ns1, i can now load a program in the namespace, to only see 1 interface device of which i have 2. eth0 & tun0. loading a service seems to work just fine, and if tun0 is removed say by killing the vpn service my program does indeed drop... however it somehow rebinds to eth0 after about 45 seconds... why? i though when i created the v-link to tun0 and added the iptable Allow/Rejects eth0 should in theory be "invisible"...
– zerikscythe
Jan 21 at 9:43
i did this step by step only dff is where the code says eth0 i replaced it with tun0 blogs.igalia.com/dpino/2016/04/10/network-namespaces
– zerikscythe
Jan 21 at 9:48