1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

Bypass Plex traffic on router running vpn client, Working good so far, Testing for few days

Discussion in 'Asuswrt-Merlin' started by Ajay1685, Feb 8, 2017.

Tags:
  1. pacmanpc

    pacmanpc Occasional Visitor

    Joined:
    Dec 27, 2017
    Messages:
    24
    its starting to do routes every time i manually start script
    Dec 31 23:16:01 admin: Starting Plex static route script...
    Dec 31 23:16:07 admin: Grabbing current ipaddresses from plex.tv
    Dec 31 23:16:07 admin: Current registered ip addresses: 52.31.73.202 52.214.33.245 34.252.160.54 34.248.236.84 52.31.227.227
    Dec 31 23:16:07 admin: Plex static routes exist. Cool!
    Dec 31 23:16:07 admin: Route doesn't exist, creating...
    Dec 31 23:16:07 admin: New routes using 34.252.160.54 created
    Dec 31 23:16:07 admin: Plex static routes exist. Cool!
    Dec 31 23:16:07 admin: Plex static routes exist. Cool!
    Dec 31 23:16:07 admin: Plex static routes exist. Cool!
    Dec 31 23:16:07 admin: Plex static route script complete
     
  2. Please support SNBForums! Just click on this link before you buy something from Amazon and we'll get a small commission on anything you buy. Thanks!
  3. Ajay1685

    Ajay1685 Occasional Visitor

    Joined:
    Aug 19, 2016
    Messages:
    39
    now from the device on 4g network , open browser , type http://ISP_IP:32400/web , that will make sure the route to your plex server is clear and open.
     
  4. pacmanpc

    pacmanpc Occasional Visitor

    Joined:
    Dec 27, 2017
    Messages:
    24
    route table.png

    unsure what the gateway ip is since it isn't my static ip although its obviously from my isp
     
  5. pacmanpc

    pacmanpc Occasional Visitor

    Joined:
    Dec 27, 2017
    Messages:
    24
    can see plex server fine

    obviously vpn isnt running yet

    the script isnt getting any more ips now
     
  6. Ajay1685

    Ajay1685 Occasional Visitor

    Joined:
    Aug 19, 2016
    Messages:
    39
    Check the same with VPN turned on, why would you keep checking with VPN off, we know it works without VPN.
     
  7. pacmanpc

    pacmanpc Occasional Visitor

    Joined:
    Dec 27, 2017
    Messages:
    24
    not working although now it seems to show my isp ip in remote server settings
    vpn route.png


    whatsmyip.org shows ip as
    Your IP Address is 38.84.134.54

    plex shows remote ip as one from isp
     
  8. Ajay1685

    Ajay1685 Occasional Visitor

    Joined:
    Aug 19, 2016
    Messages:
    39
    public IP in the plex is a good sign, now that the static route script is working, the next part is port 32400 forward from modem to router and router to plex machine.

    try turning off the bridge mode in tp-link , and let it assign 192.168.0.2 for the Asus router on lan port.

    you can also try , In plex network settings-> custom server access url enter https://YourISPpublicIP:32400
     
    Last edited: Dec 31, 2017
  9. pacmanpc

    pacmanpc Occasional Visitor

    Joined:
    Dec 27, 2017
    Messages:
    24
    where do i setup the static ip? WAN?
     
  10. Ajay1685

    Ajay1685 Occasional Visitor

    Joined:
    Aug 19, 2016
    Messages:
    39
    Capture1.PNG

    this should be the info you get from ISP with a static IP.
     
  11. pacmanpc

    pacmanpc Occasional Visitor

    Joined:
    Dec 27, 2017
    Messages:
    24
    i turned modem off bridge mode and connected just to get the settings.

    I have now manually typed them into the wan ip setting box as well as set the dns from isp

    if i don't manually type it in how would i even know what the settings are since they dont show up

    Wan Setting.jpg
     
    Last edited: Dec 31, 2017
  12. pacmanpc

    pacmanpc Occasional Visitor

    Joined:
    Dec 27, 2017
    Messages:
    24
    is there any way to test the openvpn-event script? i don't think its actually working .
    either that or i'm missing a router setting or is there something in the log i'm expecting to see?
     
  13. Xruptor

    Xruptor Regular Contributor

    Joined:
    Sep 15, 2014
    Messages:
    50
    Wouldn't the IPTables list continue to grow and grow with each new addition to it? You would have lots of routing with old invalid IP's in addition to the new IP's that are being routed. So eventually the IPTables list will be enourmous? Not sure if there is a way to clean it out and then add the new rules. Otherwise you will have old rules there with IP's that are no longer valid, every hour on the hour. I could be wrong of course.
     
  14. pacmanpc

    pacmanpc Occasional Visitor

    Joined:
    Dec 27, 2017
    Messages:
    24
    sorry i totally missed this, so i unplug modem from the WAN port on back of router and plug it into a LAN port?
    how do i get it to assign that ip to router? do i set the ip in the router like i already had or?

    Sorry for being a noob about this but what exactly do i need to do?

    atm i have modem lan4/wan socket connected to wan port on router and 4 other devices connected using lan ports in back of router.
     
  15. pacmanpc

    pacmanpc Occasional Visitor

    Joined:
    Dec 27, 2017
    Messages:
    24
    maybe it would be better if you explain your exact setup? i can copy and try get mine working lol

    i'm guessing its my router settings i must have something either in WAN, LAN DHCP or something else configured wrong.

    I now have modem in non bridged mode connecting to internet and port forwarding port 32400 to 192.168.0.2 which is WAN ip of my router.

    Modem ip is 192.168.0.1 subnet mask 255.255.255.0 with default gateway set to 192.168.0.1

    I have the WAN ip of router set to static ip mode with 192.168.0.2 as the ip and subnet mask 255.255.255.0 with 192.168.0.1 as gateway

    I have the LAN ip of router 192.168.1.1 subnet mask 255.255.255.0 and LAN DHCP gateway 192.168.1.1.
    Its port forwarding port 32400 to 192.168.1.32 which is my plex machine and main pc

    not sure if these are set correctly as before i was running modem in bridged mode and having the router make the internet connection via pppoe with everything set to get ip automatically
     
    Last edited: Jan 2, 2018
  16. pacmanpc

    pacmanpc Occasional Visitor

    Joined:
    Dec 27, 2017
    Messages:
    24
    Anyone? Bueller? Bueller
     
  17. Ajay1685

    Ajay1685 Occasional Visitor

    Joined:
    Aug 19, 2016
    Messages:
    39

    It should grow enormous only if the plex keeps changing IPs too frequently, but in this case I havent had more than 5-6 IPs over the course of 2-3 months , so haven't had issues.

    may be a separate script can be setup to clean up every week !

    If plex could let you choose IP to reach the server at instead of trying to find it out itself, the whole Plex_StaticRoute.sh drama could be avoided.

    anyways I end up rebooting all my devices within 2 - 3 month period , so this may not work for someone who is looking for a set-it-and-forget-it for 6 months or more.
     
    Last edited: Jan 13, 2018
  18. Ajay1685

    Ajay1685 Occasional Visitor

    Joined:
    Aug 19, 2016
    Messages:
    39
    you can use a custom logger msg within the script , and look for that message in the logs.
    i.e logger "this is my openvpn-event script . . . . . . . . . . . . . . . . . . . . . . . "

    My setup
    Modem
    Router 1 (WAN IP: from ISP, LAN IP: 192.168.1.1 subnet 192.168.1.0/24)
    Router 2(WAN IP: 192.168.1.2, LAN IP: 192.168.2.1 subnet 192.168.2.0/24)

    static route in router 1
    192.168.2.0 255.255.255.0 192.168.1.2 LAN

    port 32400 forwarded in router 1 for 192.168.1.2
    port 32400 forwarded in router 2 for Plex Server
     
    Last edited: Jan 13, 2018
Please support SNBForums! Just click on this link before you buy something from Amazon and we'll get a small commission on anything you buy. Thanks!