Community discussions

MikroTik App
 
NoBrainer
just joined
Topic Author
Posts: 19
Joined: Sat Sep 29, 2018 3:49 pm

Redirect traffic from specific device to another local ip

Thu Jan 03, 2019 11:17 am

Hello MikroTik community!
I want to redirect all the tcp traffic from a Nintendo Switch to my RaspberryPi. Would be nice if this could somehow be combined with the "Kid control" feature to do this from e.g. 22:00(10pm) - 7:00(7am) on the next day.

I've got the following setup at home:
MikroTik RBLHG5nD - 192.168.1.1 (static) This is the gateway which is located at my provider's local branch (Internet is provided by directional radio)
MikroTik hAP lite - 192.168.1.115 (not static)
Nintendo Switch - 192.168.1.116 (not static yet)
Raspberry Pi - 192.168.1.20 (static)

Kind regards
 
User avatar
baragoon
Member Candidate
Member Candidate
Posts: 295
Joined: Thu Jan 05, 2017 10:38 am
Location: Kyiv, UA
Contact:

Re: Redirect traffic from specific device to another local ip

Thu Jan 03, 2019 11:22 am

try something like this
/ip firewall nat add action=netmap chain=dstnat protocol=tcp src-address=nintendo_ip to-addresses=raspberry_ip
 
NoBrainer
just joined
Topic Author
Posts: 19
Joined: Sat Sep 29, 2018 3:49 pm

Re: Redirect traffic from specific device to another local ip

Thu Jan 03, 2019 11:28 am

Should I do that on my Router/Bridge or do I have to ask the provider to do this on their router?
 
User avatar
Cha0s
Forum Guru
Forum Guru
Posts: 1135
Joined: Tue Oct 11, 2005 4:53 pm

Re: Redirect traffic from specific device to another local ip

Thu Jan 03, 2019 11:39 am

Maybe something link this (to accommodate for the time requirements).
/ip firewall nat add chain=dstnat src-address=192.168.1.116 time=22h-7h,sun,mon,tue,wed,thu,fri,sat action=dst-nat to-addresses=192.168.1.20
Also, this thread needs to be moved to some other category. It has nothing to do with wireless networking.
 
NoBrainer
just joined
Topic Author
Posts: 19
Joined: Sat Sep 29, 2018 3:49 pm

Re: Redirect traffic from specific device to another local ip

Thu Jan 03, 2019 11:40 am

It's not working when doing on my router so I guess I have to ask my Provider??
Not working means that I can access any website although this NAT Rule is enabled.

Edit: This post is related on post #2
 
NoBrainer
just joined
Topic Author
Posts: 19
Joined: Sat Sep 29, 2018 3:49 pm

Re: Redirect traffic from specific device to another local ip

Thu Jan 03, 2019 11:45 am

And @Chaos your solution is also not working. As I said in the other posts: Can I do it on my Router/Bridge at home or do I have to ask my provider to do this at their router which is the gateway of our devices?
 
User avatar
baragoon
Member Candidate
Member Candidate
Posts: 295
Joined: Thu Jan 05, 2017 10:38 am
Location: Kyiv, UA
Contact:

Re: Redirect traffic from specific device to another local ip

Thu Jan 03, 2019 12:15 pm

And @Chaos your solution is also not working. As I said in the other posts: Can I do it on my Router/Bridge at home or do I have to ask my provider to do this at their router which is the gateway of our devices?
you should do it here - MikroTik RBLHG5nD - 192.168.1.1
 
User avatar
Petri
Frequent Visitor
Frequent Visitor
Posts: 97
Joined: Mon Dec 05, 2016 1:55 pm
Location: Helsinki, Finland
Contact:

Re: Redirect traffic from specific device to another local ip

Fri Jan 04, 2019 10:06 am

You need to do it on a router where the Nintendo is directing the traffic. Currently the provider router is the default gateway so it should happen there. However, I doubt the provider will do a special config for you. It would be a maintenance headache for them in the future. Your best bet would be to connect the Nintendo to one of the hAP Lite ports, take that port off the bridge and do the firewalling there. Or you could buy another small MT device and place it between the ISP router and your network.

Why are you asking this on the wireless forum? This is a pure routing problem.

Who is online

Users browsing this forum: No registered users and 37 guests