Redirect connection to a port to another port

Clash Royale CLAN TAG#URR8PPP up vote
0
down vote
favorite
I have an application listening on a specific port. The port that the application listens is allowed on my home network but is sometimes blocked on other networks. I would like to have a backup port that I can use to connect back home. I will connect to the backup port and have the traffic redirected to the main port.
How would I redirect incoming traffic on the backup port to the main port?
Edit:
I tried iptables -t nat -A PREROUTING -p tcp --dport [incoming port] -j REDIRECT --to-port [main port]. Do I have to restart my machine for the changes to take?
networking iptables port-forwarding
add a comment |Â
up vote
0
down vote
favorite
I have an application listening on a specific port. The port that the application listens is allowed on my home network but is sometimes blocked on other networks. I would like to have a backup port that I can use to connect back home. I will connect to the backup port and have the traffic redirected to the main port.
How would I redirect incoming traffic on the backup port to the main port?
Edit:
I tried iptables -t nat -A PREROUTING -p tcp --dport [incoming port] -j REDIRECT --to-port [main port]. Do I have to restart my machine for the changes to take?
networking iptables port-forwarding
You may want to do this on your home router. Your router can listen to the incoming port and port forward it to the standard port. This has nothing to do with Ubuntu.
â user68186
Mar 23 at 16:24
That's a good idea.
â Thunder-Chaser
Mar 23 at 17:13
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have an application listening on a specific port. The port that the application listens is allowed on my home network but is sometimes blocked on other networks. I would like to have a backup port that I can use to connect back home. I will connect to the backup port and have the traffic redirected to the main port.
How would I redirect incoming traffic on the backup port to the main port?
Edit:
I tried iptables -t nat -A PREROUTING -p tcp --dport [incoming port] -j REDIRECT --to-port [main port]. Do I have to restart my machine for the changes to take?
networking iptables port-forwarding
I have an application listening on a specific port. The port that the application listens is allowed on my home network but is sometimes blocked on other networks. I would like to have a backup port that I can use to connect back home. I will connect to the backup port and have the traffic redirected to the main port.
How would I redirect incoming traffic on the backup port to the main port?
Edit:
I tried iptables -t nat -A PREROUTING -p tcp --dport [incoming port] -j REDIRECT --to-port [main port]. Do I have to restart my machine for the changes to take?
networking iptables port-forwarding
networking iptables port-forwarding
edited Mar 23 at 16:12
asked Mar 23 at 15:59
Thunder-Chaser
13
13
You may want to do this on your home router. Your router can listen to the incoming port and port forward it to the standard port. This has nothing to do with Ubuntu.
â user68186
Mar 23 at 16:24
That's a good idea.
â Thunder-Chaser
Mar 23 at 17:13
add a comment |Â
You may want to do this on your home router. Your router can listen to the incoming port and port forward it to the standard port. This has nothing to do with Ubuntu.
â user68186
Mar 23 at 16:24
That's a good idea.
â Thunder-Chaser
Mar 23 at 17:13
You may want to do this on your home router. Your router can listen to the incoming port and port forward it to the standard port. This has nothing to do with Ubuntu.
â user68186
Mar 23 at 16:24
You may want to do this on your home router. Your router can listen to the incoming port and port forward it to the standard port. This has nothing to do with Ubuntu.
â user68186
Mar 23 at 16:24
That's a good idea.
â Thunder-Chaser
Mar 23 at 17:13
That's a good idea.
â Thunder-Chaser
Mar 23 at 17:13
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1018605%2fredirect-connection-to-a-port-to-another-port%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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
You may want to do this on your home router. Your router can listen to the incoming port and port forward it to the standard port. This has nothing to do with Ubuntu.
â user68186
Mar 23 at 16:24
That's a good idea.
â Thunder-Chaser
Mar 23 at 17:13