[{"content":"Hi, I am Cylon I am a programmer.\nAt the same time, I work full time is Kubernetes Engineer, If I were to express my occupation about this sector with three words, it would be engineering, research and practicality.\nI liked Linux, Network and Programming. In a free time, I generally study programming language and network technology 🙂\nYou can =\u0026gt; see my projects on github/cylonchau Contact to me with email/telegram/twitter Thank you for reading this page.\n","date":"2025-04-26","permalink":"https://www.161616.top/en/about/","summary":"Hi, I am Cylon I am a programmer.\nAt the same time, I work full time is Kubernetes Engineer, If I were to express my occupation about this sector with three words, it would be engineering, research and practicality.\nI liked Linux, Network and Programming. In a free time, I generally study programming language and network technology 🙂\nYou can =\u0026gt; see my projects on github/cylonchau Contact to me with email/telegram/twitter Thank you for reading this page.","title":"🙋🏻‍♂️ About"},{"content":"What is an Uranus? Uranus is a Linux firewalld central controller. In Greek mythology, Uranus king of gods. The firewall gateway is the Uranus for iptables.\nPrerequisites Hardware requirements We recommend these hardware requirements for production systems or for development systems that are designed to demonstrate production use cases:\nItem Description Minimum requirements Recommended Per instance You can install on one node but many features require at least one node. 1 instance \u0026gt; 1 instances RAM per instance Defining your RAM size must be part of the capacity planning for your Uranus usage. 512 Mb \u0026gt;= 1GB Persistent Storage The amount of storage space for each node. 1 GB \u0026gt;= 10GB Software requirements Item Description Recommended OS / Platform Linux, Kubernetes Debian 11\nCentos 7 Firewalld 0.6.3\n0.9.2 Centos 7 default version\nDebian 11 default version Build and run Uranus Setup an Uranus with Binary mode Build and run Uranus backend bash 1 git clone https://github.com/cylonchau/firewalld-gateway.git Compile\nbash 1 cd firewalld-gateway \u0026amp;\u0026amp; make build Frist time you need migrate database\nbash 1 2 # currently sql-driver support sqlite or mysql ./_output/firewalld-gateway --migration --sql-driver=sqlite --config firewalld-gateway.toml -v 10 Inital API Doc\nbash 1 swag init -g cmd/main.go --output ./docs/ --packageName docs Run Uranus\nbash 1 ./_output/firewalld-gateway --sql-driver=sqlite --config firewalld-gateway.toml -v 5 Setup Uranus frontend Install Nginx\nbash 1 2 3 yum install nginx -y # or apt install nginx -y Configure nginx\nbash 1 2 3 4 5 cd /etc/nginx/ \u0026amp;\u0026amp; \\ mv nginx.conf nginx.conf.default grep -Ev \u0026#39;^$|#\u0026#39; nginx.conf.default \u0026gt; nginx.conf \u0026amp;\u0026amp; \\ sed -i \u0026#39;/include/i \\ include /etc/nginx/conf.d/*.conf;\u0026#39; nginx.conf \u0026amp;\u0026amp; \\ cd conf.d Create fw.conf in conf.d directory\nbash 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 cat \u0026lt;\u0026lt;EOF \u0026gt; fw.conf server { listen 80; root /var/run/dist; location / { try_files \\$uri \\$uri/ @router; index index.html; } location ~ /fw/(?\u0026lt;section\u0026gt;.*) { proxy_pass http://10.0.0.1:2952/fw/\\$section\\$is_args\\$args; proxy_set_header X-Forwarded-Host \\$server_name; proxy_set_header X-Forwarded-Port \\$server_port; proxy_set_header X-Forwarded-Server \\$host; proxy_set_header X-Forwarded-Scheme \\$scheme; proxy_set_header X-Forwarded-URI \\$request_uri; proxy_set_header X-Real-IP \\$remote_addr; proxy_set_header X-Forwarded-For \\$proxy_add_x_forwarded_for; } location ~ /security/(?\u0026lt;section\u0026gt;.*) { proxy_pass http://10.0.0.1:2952/security/\\$section\\$is_args\\$args; proxy_set_header X-Forwarded-Host \\$server_name; proxy_set_header X-Forwarded-Port \\$server_port; proxy_set_header X-Forwarded-Server \\$host; proxy_set_header X-Forwarded-Scheme \\$scheme; proxy_set_header X-Forwarded-URI \\$request_uri; proxy_set_header X-Real-IP \\$remote_addr; proxy_set_header X-Forwarded-For \\$proxy_add_x_forwarded_for; } location ~ /sso/(?\u0026lt;section\u0026gt;.*) { proxy_pass http://10.0.0.1:2952/sso/\\$section\\$is_args\\$args; proxy_set_header X-Forwarded-Host \\$server_name; proxy_set_header X-Forwarded-Port \\$server_port; proxy_set_header X-Forwarded-Server \\$host; proxy_set_header X-Forwarded-Scheme \\$scheme; proxy_set_header X-Forwarded-URI \\$request_uri; proxy_set_header X-Real-IP \\$remote_addr; proxy_set_header X-Forwarded-For \\$proxy_add_x_forwarded_for; } location /ping { proxy_pass http://10.0.0.1:2952/ping; proxy_set_header X-Forwarded-Port \\$server_port; proxy_set_header X-Forwarded-Server \\$host; proxy_set_header X-Forwarded-Scheme \\$scheme; proxy_set_header X-Forwarded-URI \\$request_uri; proxy_set_header X-Real-IP \\$remote_addr; proxy_set_header X-Forwarded-For \\$proxy_add_x_forwarded_for; } } EOF Copy dist directory to /var/run/\nbash 1 mv dist /var/run/ Start nginx\nbash 1 systemctl start nginx Setup an Uranus with Docker build docker image bash 1 git clone https://github.com/cylonchau/firewalld-gateway.git Build image\nbash 1 docker build -t cylonchau/uranus:v0.0.5 . Run\nbash 1 docker run -d --rm --name uranus -p 2953:2953 cylonchau/uranus:v0.0.5 Notes: this mode default using sqlite, so if you want use external database, please change config file, then build image\nSetup firewalld Download Default, we provide 2 version firewalld variant version\nCentos 7 or Centos 6 Debian 11 You can download and install those firewalld vesion in you Linux\nhttps://github.com/cylonchau/firewalld/releases\nInstall Centos 7\nbash 1 2 rpm -e python-firewall-0.6.3-11 --nodeps \u0026amp;\u0026amp; rpm -ivh python-firewall-0.6.3-4.el7.noarch.rpm Debian 11\nbash 1 2 dpkg -r python3-firewall \u0026amp;\u0026amp; \\ dpkg -i python3-firewall_0.9.3-2_amd64.deb Configure Enable dbug remote mode Centos Edit /etc/dbus-1/system.conf\nxml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 \u0026lt;!-- This configuration file is no longer required and may be removed. In older versions of dbus, this file defined the behaviour of the well-known system bus. That behaviour is now determined by /usr/share/dbus-1/system.conf, which should not be edited. For local configuration changes, create a file system-local.conf or files matching system.d/*.conf in the same directory as this one, with a \u0026lt;busconfig\u0026gt; element containing configuration directives. These directives can override D-Bus or OS defaults. For upstream or distribution-wide defaults that can be overridden by a local sysadmin, create files matching /usr/share/dbus-1/system.d/*.conf instead. --\u0026gt; \u0026lt;!DOCTYPE busconfig PUBLIC \u0026#34;-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN\u0026#34; \u0026#34;http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd\u0026#34;\u0026gt; \u0026lt;busconfig\u0026gt; \u0026lt;listen\u0026gt;tcp:host=10.0.0.3,bind=*,port=55556,family=ipv4\u0026lt;/listen\u0026gt; \u0026lt;listen\u0026gt;unix:tmpdir=/tmp\u0026lt;/listen\u0026gt; \u0026lt;!-- Add this part --\u0026gt; \u0026lt;policy context=\u0026#34;default\u0026#34;\u0026gt; \u0026lt;allow user=\u0026#34;root\u0026#34; /\u0026gt; \u0026lt;allow own=\u0026#34;com.github.cylonchau.Uranus\u0026#34; /\u0026gt; \u0026lt;!-- allow uranus resiger to dbus-daemon --\u0026gt; \u0026lt;!-- if requseter is com.github.cylonchau.Uranus and request path is /org/fedoraproject/FirewallD1, then allow --\u0026gt; \u0026lt;allow receive_sender=\u0026#34;com.github.cylonchau.Uranus\u0026#34; receive_path=\u0026#34;/org/fedoraproject/FirewallD1\u0026#34; /\u0026gt; \u0026lt;/policy\u0026gt; \u0026lt;auth\u0026gt;ANONYMOUS\u0026lt;/auth\u0026gt; \u0026lt;allow_anonymous/\u0026gt; \u0026lt;/busconfig\u0026gt; Enable dbus tcp port Edit /usr/lib/systemd/system/dbus.socket\ntext 1 2 3 4 5 6 [Unit] Description=D-Bus System Message Bus Socket [Socket] ListenStream=/var/run/dbus/system_bus_socket ListenStream=55556 # \u0026lt;- Add this Reload service\nbash 1 systemctl reload firewalld Debian Edit /etc/dbus-1/system.conf\nxml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 \u0026lt;!DOCTYPE busconfig PUBLIC \u0026#34;-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN\u0026#34; \u0026#34;http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd\u0026#34;\u0026gt; \u0026lt;busconfig\u0026gt; \u0026lt;listen\u0026gt;tcp:host=10.0.0.3,bind=*,port=55556,family=ipv4\u0026lt;/listen\u0026gt; \u0026lt;listen\u0026gt;unix:tmpdir=/tmp\u0026lt;/listen\u0026gt; \u0026lt;!-- Add this part --\u0026gt; \u0026lt;policy context=\u0026#34;default\u0026#34;\u0026gt; \u0026lt;allow user=\u0026#34;root\u0026#34; /\u0026gt; \u0026lt;allow own=\u0026#34;com.github.cylonchau.Uranus\u0026#34; /\u0026gt; \u0026lt;!-- allow uranus resiger to dbus-daemon --\u0026gt; \u0026lt;!-- if requseter is com.github.cylonchau.Uranus and request path is /org/fedoraproject/FirewallD1, then allow --\u0026gt; \u0026lt;allow receive_sender=\u0026#34;com.github.cylonchau.Uranus\u0026#34; receive_path=\u0026#34;/org/fedoraproject/FirewallD1\u0026#34; /\u0026gt; \u0026lt;/policy\u0026gt; \u0026lt;auth\u0026gt;ANONYMOUS\u0026lt;/auth\u0026gt; \u0026lt;allow_anonymous/\u0026gt; \u0026lt;/busconfig\u0026gt; Edit /usr/lib/systemd/system/dbus.socket\ntext 1 2 3 4 5 6 7 [Unit] Description=D-Bus System Message Bus Socket # Add this part [Socket] ListenStream=/var/run/dbus/system_bus_socket ListenStream=55556 Add managed firewalld Linux host to Uranus Add host\n","date":"2024-08-23","permalink":"https://www.161616.top/en/uranus-installation/","summary":"What is an Uranus? Uranus is a Linux firewalld central controller. In Greek mythology, Uranus king of gods. The firewall gateway is the Uranus for iptables.\nPrerequisites Hardware requirements We recommend these hardware requirements for production systems or for development systems that are designed to demonstrate production use cases:\nItem Description Minimum requirements Recommended Per instance You can install on one node but many features require at least one node. 1 instance \u0026gt; 1 instances RAM per instance Defining your RAM size must be part of the capacity planning for your Uranus usage.","title":"Uranus installation"}]