Projekt

Allgemein

Profil

Config firewalld » Historie » Version 1

Jeremias Keihsler, 13.01.2017 09:22

1 1 Jeremias Keihsler
h1. firewalld
2
3
have a look at https://www.certdepot.net/rhel7-get-started-firewalld/
4
5
to forward a specific port (not yet working!)
6
<pre><code class="bash">
7
firewall-cmd --zone=public --permanent --add-port=2222/tcp
8
firewall-cmd --zone=public --add-masquerade --permanent
9
firewall-cmd --zone=public --add-forward-port=port=2222:proto=tcp:toport=22:toaddr=192.168.122.80 --permanent
10
firewall-cmd --reload
11
firewall-cmd --zone=public --list-all
12
</code></pre>
13
14
h1. Testing
15
16
you may consider http://portquiz.net/
17
18
<pre><code class="bash">
19
http://portquiz.net:1234/
20
</code></pre>
21
22
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:
23
24
<pre><code class="bash">
25
wget -qO- portquiz.net:1234 
26
</code></pre>
27
28
<pre><code class="bash">
29
Port 1234 test successful!
30
Your IP: 198.252.206.16
31
</code></pre>