Routing HTTPS to another port












-1















I am accessing a remote server through ssh on a certain port (33000). The port forwarding set up on this server routes HTTPS port 443 to port 10000.



The problem is any calls i make from the command line that request a resource from a https source are not working. The application of this is i am trying to install some node packages however, putting aside access to the node.js registry which i know i can change to use the less secure http registry instead of https with:



npm config set registry 'http://....'


Some of my packages make calls to third party HTTPS locations and therefore installing of these packages hangs and never succeeds.



My knowledge is that this is happening because the HTTPS port 443 is being redirected by the server to 10000 because of the port forwarding rules in place so my question is if it's possible to route my calls to this port 10000 using iptables or something similar?



Note i have already tried setting up PREROUTING redirects with iptables with no luck.










share|improve this question























  • point your hosts file to another address

    – saj
    Dec 29 '18 at 2:54











  • i don't understand how this would work? what inside the hosts file would i point to another address?

    – Alec Gurman
    Dec 29 '18 at 3:13











  • The computer file hosts is an operating system file that maps hostnames to IP addresses so you can redirect abc.com:8080 to abc.com:1010 etc

    – saj
    Dec 29 '18 at 3:17











  • Yeh i understand the hosts file, however in my scenario would abc.com not just be localhost / ip of the server?

    – Alec Gurman
    Dec 29 '18 at 3:26













  • my bad you cant add a port directly to hosts see this for alternatives stackoverflow.com/questions/8652948/…

    – saj
    Dec 29 '18 at 3:43
















-1















I am accessing a remote server through ssh on a certain port (33000). The port forwarding set up on this server routes HTTPS port 443 to port 10000.



The problem is any calls i make from the command line that request a resource from a https source are not working. The application of this is i am trying to install some node packages however, putting aside access to the node.js registry which i know i can change to use the less secure http registry instead of https with:



npm config set registry 'http://....'


Some of my packages make calls to third party HTTPS locations and therefore installing of these packages hangs and never succeeds.



My knowledge is that this is happening because the HTTPS port 443 is being redirected by the server to 10000 because of the port forwarding rules in place so my question is if it's possible to route my calls to this port 10000 using iptables or something similar?



Note i have already tried setting up PREROUTING redirects with iptables with no luck.










share|improve this question























  • point your hosts file to another address

    – saj
    Dec 29 '18 at 2:54











  • i don't understand how this would work? what inside the hosts file would i point to another address?

    – Alec Gurman
    Dec 29 '18 at 3:13











  • The computer file hosts is an operating system file that maps hostnames to IP addresses so you can redirect abc.com:8080 to abc.com:1010 etc

    – saj
    Dec 29 '18 at 3:17











  • Yeh i understand the hosts file, however in my scenario would abc.com not just be localhost / ip of the server?

    – Alec Gurman
    Dec 29 '18 at 3:26













  • my bad you cant add a port directly to hosts see this for alternatives stackoverflow.com/questions/8652948/…

    – saj
    Dec 29 '18 at 3:43














-1












-1








-1








I am accessing a remote server through ssh on a certain port (33000). The port forwarding set up on this server routes HTTPS port 443 to port 10000.



The problem is any calls i make from the command line that request a resource from a https source are not working. The application of this is i am trying to install some node packages however, putting aside access to the node.js registry which i know i can change to use the less secure http registry instead of https with:



npm config set registry 'http://....'


Some of my packages make calls to third party HTTPS locations and therefore installing of these packages hangs and never succeeds.



My knowledge is that this is happening because the HTTPS port 443 is being redirected by the server to 10000 because of the port forwarding rules in place so my question is if it's possible to route my calls to this port 10000 using iptables or something similar?



Note i have already tried setting up PREROUTING redirects with iptables with no luck.










share|improve this question














I am accessing a remote server through ssh on a certain port (33000). The port forwarding set up on this server routes HTTPS port 443 to port 10000.



The problem is any calls i make from the command line that request a resource from a https source are not working. The application of this is i am trying to install some node packages however, putting aside access to the node.js registry which i know i can change to use the less secure http registry instead of https with:



npm config set registry 'http://....'


Some of my packages make calls to third party HTTPS locations and therefore installing of these packages hangs and never succeeds.



My knowledge is that this is happening because the HTTPS port 443 is being redirected by the server to 10000 because of the port forwarding rules in place so my question is if it's possible to route my calls to this port 10000 using iptables or something similar?



Note i have already tried setting up PREROUTING redirects with iptables with no luck.







node.js linux routing port iptables






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 29 '18 at 2:45









Alec GurmanAlec Gurman

1




1













  • point your hosts file to another address

    – saj
    Dec 29 '18 at 2:54











  • i don't understand how this would work? what inside the hosts file would i point to another address?

    – Alec Gurman
    Dec 29 '18 at 3:13











  • The computer file hosts is an operating system file that maps hostnames to IP addresses so you can redirect abc.com:8080 to abc.com:1010 etc

    – saj
    Dec 29 '18 at 3:17











  • Yeh i understand the hosts file, however in my scenario would abc.com not just be localhost / ip of the server?

    – Alec Gurman
    Dec 29 '18 at 3:26













  • my bad you cant add a port directly to hosts see this for alternatives stackoverflow.com/questions/8652948/…

    – saj
    Dec 29 '18 at 3:43



















  • point your hosts file to another address

    – saj
    Dec 29 '18 at 2:54











  • i don't understand how this would work? what inside the hosts file would i point to another address?

    – Alec Gurman
    Dec 29 '18 at 3:13











  • The computer file hosts is an operating system file that maps hostnames to IP addresses so you can redirect abc.com:8080 to abc.com:1010 etc

    – saj
    Dec 29 '18 at 3:17











  • Yeh i understand the hosts file, however in my scenario would abc.com not just be localhost / ip of the server?

    – Alec Gurman
    Dec 29 '18 at 3:26













  • my bad you cant add a port directly to hosts see this for alternatives stackoverflow.com/questions/8652948/…

    – saj
    Dec 29 '18 at 3:43

















point your hosts file to another address

– saj
Dec 29 '18 at 2:54





point your hosts file to another address

– saj
Dec 29 '18 at 2:54













i don't understand how this would work? what inside the hosts file would i point to another address?

– Alec Gurman
Dec 29 '18 at 3:13





i don't understand how this would work? what inside the hosts file would i point to another address?

– Alec Gurman
Dec 29 '18 at 3:13













The computer file hosts is an operating system file that maps hostnames to IP addresses so you can redirect abc.com:8080 to abc.com:1010 etc

– saj
Dec 29 '18 at 3:17





The computer file hosts is an operating system file that maps hostnames to IP addresses so you can redirect abc.com:8080 to abc.com:1010 etc

– saj
Dec 29 '18 at 3:17













Yeh i understand the hosts file, however in my scenario would abc.com not just be localhost / ip of the server?

– Alec Gurman
Dec 29 '18 at 3:26







Yeh i understand the hosts file, however in my scenario would abc.com not just be localhost / ip of the server?

– Alec Gurman
Dec 29 '18 at 3:26















my bad you cant add a port directly to hosts see this for alternatives stackoverflow.com/questions/8652948/…

– saj
Dec 29 '18 at 3:43





my bad you cant add a port directly to hosts see this for alternatives stackoverflow.com/questions/8652948/…

– saj
Dec 29 '18 at 3:43












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53966286%2frouting-https-to-another-port%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
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • 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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53966286%2frouting-https-to-another-port%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

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas