What's new

How can I route traffic from a device through an interface created on the router?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Kyjiep

Regular Contributor
I created an sbtun interface using sing-box on my router RT-AX86U with firmware Merlin 3004.388.7. How can I route traffic from a device with the address 192.168.50.31, which is in the router's network, through this sbtun interface?
Sorry for my English.
 
Last edited:
I created an sbtun interface using sing-box on my router RT-AX86U with firmware Merlin 3004.388.7. How can I route traffic from a device with the address 192.168.50.31, which is in the router's network, through this sbtun interface?
Sorry for my English.
Routes are destination ip based, not source ip based. So if the ips you would like to access via sbtun interface are one or more unique confined ranges you could just add a route in the main route table. All lan could then access these ip/ranges via sbtun interface.

If you plan on accessing I.e internet (all ips) via this interface only from a specific lan ip you will need to setup a new routing table and create ip rules that your lan ip will use only. It gets a tad more messy.
 
Routes are destination ip based, not source ip based. So if the ips you would like to access via sbtun interface are one or more unique confined ranges you could just add a route in the main route table. All lan could then access these ip/ranges via sbtun interface.

If you plan on accessing I.e internet (all ips) via this interface only from a specific lan ip you will need to setup a new routing table and create ip rules that your lan ip will use only. It gets a tad more messy.
Thank you. I already figured this out using ChatGPT, and with its help I even made the corresponding script. It works as I wanted. There are some minor flaws that I couldn't eliminate, but I'm happy with it anyway. Later I will translate the readme into English and upload it here along with the script.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top