# Simpler way to configure Oracle VPS as a VPN to get around CGSNAT for node hosting purposes

**URL:** <https://forum.storj.io/t/simpler-way-to-configure-oracle-vps-as-a-vpn-to-get-around-cgsnat-for-node-hosting-purposes/27949>\
**Category:** getting started\
**Tags:** vpn, firewall, cgnat\
**Created:** [September 19, 2024, 7:19am UTC](https://forum.storj.io/t/simpler-way-to-configure-oracle-vps-as-a-vpn-to-get-around-cgsnat-for-node-hosting-purposes/27949 "2024-09-19T07:19:20Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![arrogantrabbit](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/arrogantrabbit/32/11200_2.png) [@arrogantrabbit](https://forum.storj.io/u/arrogantrabbit)\
**Post date:** [September 19, 2024, 7:19am UTC](https://forum.storj.io/t/simpler-way-to-configure-oracle-vps-as-a-vpn-to-get-around-cgsnat-for-node-hosting-purposes/27949/1 "2024-09-19T07:19:20Z")

</div>

Continuing the discussion from [Did anybody tried oracle free tier as vpn?](https://forum.storj.io/t/did-anybody-tried-oracle-free-tier-as-vpn/24344/2):

This modified approach avoids messing with iptables rules and accomplishes the same outcome in a drastically simpler and straightforward way, taking advantage of firewalld, that is already running on the oracle linux instances anyway.

Setup goes as follows:

- Configure firewall on the oracle gateway in the web or cli console, to allow your node’s port and wireguard port, as described in the linked post above

- Configure Wireguard tunnel, following whatever tutorial you like. Just bare minimum, no preUp/psotDown rules or anything else fancy.

- Now the packet forwarding bits, without the hard to follow and maintain iptables. Run this script, making adjustments to ports, addresses, or interface names if needed:

- Connect wireguard, startup your node, make sure all works. Then make the firewalld configuration persistent:

Bonus:

Configure alarm on the query `BytesToIgw[1d].sum() > 333,000,000,000` on `oct_internet_gateway` – this way you will get notified if you used up over 10TB/30 of traffic in one day, indicating that you might want to eventually switch to some other vpn service with unmetered egress, as you will likely blow through free allowance.

---

_[View the full topic](https://forum.storj.io/t/simpler-way-to-configure-oracle-vps-as-a-vpn-to-get-around-cgsnat-for-node-hosting-purposes/27949)._
