anyone got Plex remote access working on Oracle Cloud?

cybertechcybertech OGBenchmark King

free tier.

am new to public and internal IP. normally my Plex servers are connected directly via public IP.

in this case there's a public and private IP assigned to the VM and it shows me below, I don't understand. under the VCN security settings I opened TCP 32400 for ingress.

not sure whats missing here.

I bench YABS 24/7/365 unless it's a leap year.

Comments

  • The iptables may need to be modified.

    Thanked by (1)cybertech
  • May be you need to add 32400 to egress as well

    Thanked by (1)cybertech
  • @cybertech said:

    not sure whats missing here.

    You need to edit iptables to allow 32400 ingress.
    I use the template in this video

    Thanked by (1)cybertech
  • cybertechcybertech OGBenchmark King

    thanks for all the tips. tried everything and it now works, now gotta figure out which was the key.

    I bench YABS 24/7/365 unless it's a leap year.

  • @cybertech said:
    thanks for all the tips. tried everything and it now works, now gotta figure out which was the key.

    Try reversing the each action and see which one breaks it

    Thanked by (1)cybertech
  • @cybertech said:
    thanks for all the tips. tried everything and it now works, now gotta figure out which was the key.

    Sometimes Plex lies about whether it can be accessed from the Internet. I get that message appear occasionally even though my Plex is completely accessible...

    Thanked by (1)BarryHercules

    Get the best deal on your next VPS or Shared/Reseller hosting from RacknerdTracker.com - The original aff garden.

  • edited July 2021

    @dahartigan said:

    @cybertech said:
    thanks for all the tips. tried everything and it now works, now gotta figure out which was the key.

    Sometimes Plex lies about whether it can be accessed from the Internet. I get that message appear occasionally even though my Plex is completely accessible...

    There must be sonething wrong with your plex server then or may be network it is on. I have few servers in EU that are accessible whenever I try.

    The issue in OP's case was due to iptables. I dont use oracle cloud myself for plex but I do know that firewall configuration alone isnt enough to access services on oracle cloud. I found about the iptables issue from the oracle cloud thread at OGF. Once I reset the IPtables, it was just like any other VPS and I was able to use v2ray

  • @xowxenxirix said:

    @dahartigan said:

    @cybertech said:
    thanks for all the tips. tried everything and it now works, now gotta figure out which was the key.

    Sometimes Plex lies about whether it can be accessed from the Internet. I get that message appear occasionally even though my Plex is completely accessible...

    There must be sonething wrong with your plex server then or may be network it is on. I have few servers in EU that are accessible whenever I try.

    The issue in OP's case was due to iptables. I dont use oracle cloud myself for plex but I do know that firewall configuration alone isnt enough to access services on oracle cloud. I found about the iptables issue from the oracle cloud thread at OGF. Once I reset the IPtables, it was just like any other VPS and I was able to use v2ray

    Nothing wrong with my Plex server, running solid for years now. It is probably as you suggested a networking setup thing. I have my Plex on a NAT network, no public IP, but it's port forwarded for direct access with iptables rules and I also use haproxy and cloudflare for the frontend on a subdomain. Runs flawlessly.

    Get the best deal on your next VPS or Shared/Reseller hosting from RacknerdTracker.com - The original aff garden.

  • cybertechcybertech OGBenchmark King

    seems like it's gotta take a while for ARM cloud resources to free up before I can make a new VM and try it again :p

    I bench YABS 24/7/365 unless it's a leap year.

  • d0gd0g
    edited March 2022

    I've got the same problem @cybertech ... did you find a way to make it work?
    I've tried firewalld, iptables, ingress/egress rules, disabling ufw ... nothing works!

    Also not sure if related but server shows port 0 on public side:

  • Using this usually works for me after adjusting the VCN security list: https://stackoverflow.com/questions/54794217/opening-port-80-on-oracle-cloud-infrastructure-compute-node

    Cheap dedis are my drug, and I'm too far gone to turn back.

  • @dahartigan said:

    @cybertech said:
    thanks for all the tips. tried everything and it now works, now gotta figure out which was the key.

    Sometimes Plex lies about whether it can be accessed from the Internet. I get that message appear occasionally even though my Plex is completely accessible...

    Happened to my setup a number of times of the years, even reporting the problem whilst people are streaming content over the internet. Whatever they’re doing to validate connectivity clearly isn’t exactly what’s need to connect to PMS over the internet.

  • cybertechcybertech OGBenchmark King

    @d0g said:
    I've got the same problem @cybertech ... did you find a way to make it work?
    I've tried firewalld, iptables, ingress/egress rules, disabling ufw ... nothing works!

    Also not sure if related but server shows port 0 on public side:

    i stopped using oracle free ... but i think i did manage to get it work for a short while as per @CamoYoshi 's method - VCN

    I bench YABS 24/7/365 unless it's a leap year.

  • To open a port on Oracle Cloud, you need:

    • VCN ingress rule
    • iptables ACCEPT rule

    Internet Gateway provides symmetric NAT, and there's no need for port forwarding rule.

    Reference: How to Host a Website in Oracle Cloud Free Tier

  • Reviving this this topic a bit as I have the same issue. I'm running on 20.04 Ubuntu release with Plex on port 32400 on bare metal instead of Docker. Flushing the iptables with sudo iptables -F did solve it for me. However I don't think that's a good way of solving this.

    Before trying to mess up with iptables, I've installed Docker with Portainer. To my surprise, after checking the box to manually specify port in Plex, the remote access started working without any issue. There was no need to flush the iptables. Plex is also running on port 32400
    After this, I have shut down the stack and tried to do the same with a bare metal installation but the remote access was always limited and not open. I removed the Oracle iptables and the result was the same. The only remaining iptables were from docker.
    To my surprise, after I removed most of those docker iptables, my remote connection started to work.
    I couldn't figure out which rules exactly might be doing this and or if I can somehow create a workaround around it via some different rule.

    I have split the iptables commands into 2 separate one liners. Whenever I applied either of those, my plex access started to work.
    Now, I'm not sure if I would have this problem without Docker being installed, with the free tier I can't unfortunately test that easily.

    Based on this, could somebody tell me if there is something that might be messing up with the ports/routing?

    sudo iptables -t nat -D PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
    sudo iptables -t nat -D OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER
    sudo iptables -t nat -D POSTROUTING -s 172.16.0.0/16 ! -o docker0 -j MASQUERADE
    sudo iptables -t nat -D POSTROUTING -s 172.16.0.2/32 -d 172.16.0.2/32 -p tcp -m tcp --dport 9000 -j MASQUERADE
    sudo iptables -t nat -D POSTROUTING -s 172.16.0.2/32 -d 172.16.0.2/32 -p tcp -m tcp --dport 8000 -j MASQUERADE
    sudo iptables -t nat -D DOCKER -i docker0 -j RETURN
    sudo iptables -t nat -D DOCKER ! -i docker0 -p tcp -m tcp --dport 9000 -j DNAT --to-destination 172.16.0.2:9000
    sudo iptables -t nat -D DOCKER ! -i docker0 -p tcp -m tcp --dport 8000 -j DNAT --to-destination 172.16.0.2:8000
    
    sudo iptables -D INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
    sudo iptables -D INPUT -p icmp -j ACCEPT
    sudo iptables -D INPUT -i lo -j ACCEPT
    sudo iptables -D INPUT -p udp -m udp --sport 123 -j ACCEPT
    sudo iptables -D INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
    sudo iptables -D INPUT -j REJECT --reject-with icmp-host-prohibited
    sudo iptables -t filter -D FORWARD -j DOCKER-USER
    sudo iptables -t filter -D FORWARD -j DOCKER-ISOLATION-STAGE-1
    sudo iptables -t filter -D FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
    sudo iptables -t filter -D FORWARD -o docker0 -j DOCKER
    sudo iptables -t filter -D FORWARD -i docker0 ! -o docker0 -j ACCEPT
    sudo iptables -t filter -D FORWARD -i docker0 -o docker0 -j ACCEPT
    sudo iptables -t filter -D FORWARD -j REJECT --reject-with icmp-host-prohibited
    sudo iptables -t filter -D OUTPUT -d 179.254.0.0/16 -j InstanceServices
    sudo iptables -t filter -D DOCKER -d 172.16.0.2/32 ! -i docker0 -o docker0 -p tcp -m tcp --dport 9000 -j ACCEPT
    sudo iptables -t filter -D DOCKER -d 172.16.0.2/32 ! -i docker0 -o docker0 -p tcp -m tcp --dport 8000 -j ACCEPT
    sudo iptables -t filter -D DOCKER-ISOLATION-STAGE-1 -i docker0 ! -o docker0 -j DOCKER-ISOLATION-STAGE-2
    sudo iptables -t filter -D DOCKER-ISOLATION-STAGE-1 -j RETURN
    sudo iptables -t filter -D DOCKER-ISOLATION-STAGE-2 -o docker0 -j DROP
    sudo iptables -t filter -D DOCKER-ISOLATION-STAGE-2 -j RETURN
    sudo iptables -t filter -D DOCKER-USER -j RETURN
    
Sign In or Register to comment.