Community discussions

 
Derell
just joined
Topic Author
Posts: 17
Joined: Thu Sep 22, 2016 11:41 am

port forwarding

Thu Dec 01, 2016 4:00 pm

hi there guys
today im asking about port forwarding
so i just started to replace my router from tp link to mikrotik and i just realy confused
so tp link is so easy like u just type start port end port protocol and ur ip
but in mikrotik it was so diffrent or mayBE u guys can help :P thanks
 
erlinden
Member Candidate
Member Candidate
Posts: 173
Joined: Wed Jun 12, 2013 1:59 pm

Re: port forwarding

Thu Dec 01, 2016 10:36 pm

 
TyBermea
newbie
Posts: 29
Joined: Mon Nov 02, 2015 3:18 am
Contact:

Re: port forwarding

Fri Dec 02, 2016 4:41 am

Here is an example of destination NAT (port forwarding):
/ip firewall nat
add action=dst-nat chain=dstnat comment="Unifi Video" dst-port=7443,7446 protocol=tcp to-addresses=10.11.43.4
add action=dst-nat chain=dstnat comment="RDP" dst-port=3389 protocol=tcp to-addresses=10.11.43.254
Ty Bermea
MTCNA, MTCRE, MTCTCE, MTCUME, MTCWE
www.ispsupplies.com
 
Derell
just joined
Topic Author
Posts: 17
Joined: Thu Sep 22, 2016 11:41 am

Re: port forwarding

Fri Dec 02, 2016 11:24 am

none of them work
i make uttorent to listen to the port that i want but when i see in canyouseeme it still say couldnt see you ... on port 1337
 
User avatar
tslytsly
Frequent Visitor
Frequent Visitor
Posts: 57
Joined: Tue Oct 27, 2015 6:52 pm
Location: Nottingham
Contact:

Re: port forwarding

Fri Dec 02, 2016 11:49 am

Hi derell
Don't forget to add a filter rule to allow the traffic:
ip firewall filter add chain=forward connection-nat-state=dstnat action=accept comment="allow NAT'd traffic" disabled=no
hope that helps.
There are 10 types of people in this world:
  • Those who understand binary
    Those who don't
    and those that didn't expect me to be using Ternary!
:lol:
 
Derell
just joined
Topic Author
Posts: 17
Joined: Thu Sep 22, 2016 11:41 am

Re: port forwarding

Fri Dec 02, 2016 1:09 pm

yi already done that but sadly it gave me same result so i did i do something wrong so this is my rule
chain dst nat
dst port 1337
action dst nat
to port 1337
to addres my ip4 addres
 
User avatar
tslytsly
Frequent Visitor
Frequent Visitor
Posts: 57
Joined: Tue Oct 27, 2015 6:52 pm
Location: Nottingham
Contact:

Re: port forwarding

Fri Dec 02, 2016 1:20 pm

yi already done that but sadly it gave me same result so i did i do something wrong so this is my rule
chain dst nat
dst port 1337
action dst nat
to port 1337
to addres my ip4 addres
Hmm, can you please paste the output of:
ip firewall filter print
Make sure to delete or obscure any private data.
There are 10 types of people in this world:
  • Those who understand binary
    Those who don't
    and those that didn't expect me to be using Ternary!
:lol:
 
Derell
just joined
Topic Author
Posts: 17
Joined: Thu Sep 22, 2016 11:41 am

Re: port forwarding

Fri Dec 02, 2016 2:48 pm

how u can do that there no filter print
 
User avatar
tslytsly
Frequent Visitor
Frequent Visitor
Posts: 57
Joined: Tue Oct 27, 2015 6:52 pm
Location: Nottingham
Contact:

Re: port forwarding

Fri Dec 02, 2016 3:10 pm

If you are using winbox you can open a terminal and export bits of the config with the print command.

On the left side if Winbox, under Tools you should see New Terminal, click this.

in the terminal window that opens type:
ip firewall filter print
this will output something like this in the terminal window:
Flags: X - disabled, I - invalid, D - dynamic 
 3    ;;; default configuration
      chain=input action=accept protocol=icmp log=no log-prefix="" 

 4    ;;; default configuration
      chain=input action=accept connection-state=established log=no log-prefix="" 

 5    ;;; default configuration
      chain=input action=accept connection-state=related log=no log-prefix="" 
Using the mouse highlight and right-click, select copy.

You can now paste into the forum, although make sure to remove any sensitive info.
There are 10 types of people in this world:
  • Those who understand binary
    Those who don't
    and those that didn't expect me to be using Ternary!
:lol:
 
Derell
just joined
Topic Author
Posts: 17
Joined: Thu Sep 22, 2016 11:41 am

Re: port forwarding

Fri Dec 02, 2016 3:17 pm

Flags: X - disabled, I - invalid, D - dynamic
0 ;;; allow NAT'd traffic
chain=forward action=accept connection-nat-state=dstnat log=no
log-prefix=""
there u go hope u can help me
 
User avatar
tslytsly
Frequent Visitor
Frequent Visitor
Posts: 57
Joined: Tue Oct 27, 2015 6:52 pm
Location: Nottingham
Contact:

Re: port forwarding

Fri Dec 02, 2016 3:56 pm

Flags: X - disabled, I - invalid, D - dynamic
0 ;;; allow NAT'd traffic
chain=forward action=accept connection-nat-state=dstnat log=no
log-prefix=""
there u go hope u can help me
Hmm, that looks ok. And if it is the only rule then it would work anyway because ROS is default accept.

Can you do that same with:
ip firewall nat print
There are 10 types of people in this world:
  • Those who understand binary
    Those who don't
    and those that didn't expect me to be using Ternary!
:lol:
 
Derell
just joined
Topic Author
Posts: 17
Joined: Thu Sep 22, 2016 11:41 am

Re: port forwarding

Sun Dec 04, 2016 8:38 am

chain=dstnat action=dst-nat to-addresses=my ip4 to-ports=1334
protocol=tcp dst-port=1334 log=no log-prefix=""
and
chain=dstnat action=dst-nat to-addresses=my ip4 to-ports=1337
protocol=tcp dst-port=1337 log=no log-prefix=""
 
Derell
just joined
Topic Author
Posts: 17
Joined: Thu Sep 22, 2016 11:41 am

Re: port forwarding

Sun Dec 04, 2016 8:38 am

i tried port forwarding both of them none of them work
 
User avatar
tslytsly
Frequent Visitor
Frequent Visitor
Posts: 57
Joined: Tue Oct 27, 2015 6:52 pm
Location: Nottingham
Contact:

Re: port forwarding

Mon Dec 05, 2016 10:25 am

chain=dstnat action=dst-nat to-addresses=my ip4 to-ports=1334
protocol=tcp dst-port=1334 log=no log-prefix=""
and
chain=dstnat action=dst-nat to-addresses=my ip4 to-ports=1337
protocol=tcp dst-port=1337 log=no log-prefix=""

OK, make sure you specify which interface the traffic will arrive in, so in each rule either add the interface or the IP of the interface as the destination.

Otherwise those rules will match any traffic traversing the router on those ports.
There are 10 types of people in this world:
  • Those who understand binary
    Those who don't
    and those that didn't expect me to be using Ternary!
:lol:
 
Derell
just joined
Topic Author
Posts: 17
Joined: Thu Sep 22, 2016 11:41 am

Re: port forwarding

Thu Dec 08, 2016 1:16 am

So What i should do
In interface or out interface
And What should i pick
Thanks btw u help ke This far
 
User avatar
dgnevans
Member
Member
Posts: 463
Joined: Fri Mar 08, 2013 11:24 am
Location: Zimbabwe
Contact:

Re: port forwarding

Thu Dec 08, 2016 10:22 am

Destination address if you have a static IP from your ISP Or In Interface and choose your wan interface as the traffic is coming in on that interface.
 
User avatar
tslytsly
Frequent Visitor
Frequent Visitor
Posts: 57
Joined: Tue Oct 27, 2015 6:52 pm
Location: Nottingham
Contact:

Re: port forwarding

Thu Dec 08, 2016 10:27 am

This:
Destination address if you have a static IP from your ISP Or In Interface and choose your wan interface as the traffic is coming in on that interface.

If you are going to specify the interface you need to use
in-interface=
this is because you want to translate traffic arriving in your WAN interface.
There are 10 types of people in this world:
  • Those who understand binary
    Those who don't
    and those that didn't expect me to be using Ternary!
:lol:
 
Derell
just joined
Topic Author
Posts: 17
Joined: Thu Sep 22, 2016 11:41 am

Re: port forwarding

Thu Dec 08, 2016 4:57 pm

so if i just wanted to open the port
so that canyouseeme succses
what interface should i put thanks though :):):)

Who is online

Users browsing this forum: MSN [Bot] and 28 guests