Community discussions

 
ik3umt
Member Candidate
Member Candidate
Topic Author
Posts: 248
Joined: Tue Jul 08, 2014 3:58 pm

Re-route a port to router.....

Fri Oct 30, 2015 6:04 pm

My dsl router has all incoming traffic forwarded transparently to my routerboard wan interface
How can I re-route an incoming tcp connection (let's say port 8080) back to my router lan in port 80 for maintenance purpose ??
Dsl router doesn't allow mainenance from dsl line.
 
jarda
Forum Guru
Forum Guru
Posts: 7604
Joined: Mon Oct 22, 2012 4:46 pm

Sat Oct 31, 2015 7:29 pm

Use dst nat rule in firewall / nat window.
 
troffasky
Member
Member
Posts: 399
Joined: Wed Mar 26, 2014 4:37 pm

Re: Re-route a port to router.....

Sat Oct 31, 2015 7:51 pm

Or you could just change the web service port from 80 to 8080.
 
ik3umt
Member Candidate
Member Candidate
Topic Author
Posts: 248
Joined: Tue Jul 08, 2014 3:58 pm

Re: Re-route a port to router.....

Mon Nov 02, 2015 1:03 pm

It doesn't work.... probably it doesn't know where to route traffic back.....


My office ip address is aaa.bbb.ccc.ddd

ISP router lan is 10.0.0.1/30
routerboard wan is 10.0.0.2/30 on eth1

chain=dstnat action=dst-nat to-addresses=10.0.0.1 to-ports=80 protocol=tcp src-address=aaa.bbb.ccc.ddd in-interface=ether1 dst-port=8080

I see traffic in NAT windows but no answer back to my office when trying to connect ISP router pubblic static IPaddress on port 8080

(connection timed out on my web browser)

Any idea ??
 
lenart
Frequent Visitor
Frequent Visitor
Posts: 58
Joined: Sat Jun 28, 2014 10:56 am

Re: Re-route a port to router.....

Mon Nov 02, 2015 1:48 pm

I've solved this issue by adding a masquerade rule to my srcnat chain. That way, my Mikrotik replaces my LAN ip address with the IP address of the interface facing the DSL modem. That way my DSL modem just has to deal with the subnet between the modem and the Mikrotik.

/ip firewall nat add chain=srcnat dst-address=10.0.0.0/30 out-interface=eth1 action=masquerade
 
ik3umt
Member Candidate
Member Candidate
Topic Author
Posts: 248
Joined: Tue Jul 08, 2014 3:58 pm

Re: Re-route a port to router.....

Mon Nov 02, 2015 3:08 pm

I've solved this issue by adding a masquerade rule to my srcnat chain. That way, my Mikrotik replaces my LAN ip address with the IP address of the interface facing the DSL modem. That way my DSL modem just has to deal with the subnet between the modem and the Mikrotik.

/ip firewall nat add chain=srcnat dst-address=10.0.0.0/30 out-interface=eth1 action=masquerade

That does the trick !!!

Thanks for the tip.

Who is online

Users browsing this forum: No registered users and 162 guests