Projekt

Allgemein

Profil

Config firewalld » Historie » Version 1

Jeremias Keihsler, 10.09.2020 14:32

1 1 Jeremias Keihsler
h1. Config firewalld
2
3
have a look at 
4
* https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-firewalld-on-centos-8
5
* https://www.certdepot.net/rhel7-get-started-firewalld/
6
7
to forward a specific port (not yet working!)
8
<pre><code class="bash">
9
firewall-cmd --zone=public --permanent --add-port=2222/tcp
10
firewall-cmd --zone=public --add-masquerade --permanent
11
firewall-cmd --zone=public --add-forward-port=port=2222:proto=tcp:toport=22:toaddr=192.168.122.80 --permanent
12
firewall-cmd --reload
13
firewall-cmd --zone=public --list-all
14
</code></pre>
15
16
h1. Testing
17
18
you may consider http://portquiz.net/
19
20
<pre><code class="bash">
21
http://portquiz.net:1234/
22
</code></pre>
23
24
This example tests whether you are able to visit outbound port 1234. You simply change the port number to whatever you like. Also, the site gives some examples that could be used in a command line script:
25
26
<pre><code class="bash">
27
wget -qO- portquiz.net:1234 
28
</code></pre>
29
30
<pre><code class="bash">
31
Port 1234 test successful!
32
Your IP: 198.252.206.16
33
</code></pre>