Skip to content

emka.web.id

Menu
  • Home
  • Indeks Artikel
  • Tutorial
  • Tentang Kami
Menu

Firewalld Port Forwarding Example (CentOS/Fedora)

Posted on November 04, 2020 by Syauqi Wiryahasana
Port forwarding within the same server: [sourcecode]firewall-cmd --add-forward-port=port=port-number:proto=tcp|udp|sctp|dccp:toport=port-number[/sourcecode] example: [sourcecode]firewall-cmd --add-forward-port=port=8080:proto=tcp:toport=80[/sourcecode] where:
  • port=8080 comes from client: :8080
  • proto=tcp uses tcp as the protocol
  • toport=80 comes to :80
for persistent connection, you must add --runtime-to-permanent option. [sourcecode]firewall-cmd --runtime-to-permanent[/sourcecode] check your all firewalld settings to make sure everything is fine [sourcecode]firewall-cmd --list-all[/sourcecode] example:
public (active)
target: default
icmp-block-inversion: no
interfaces: eth0 eth1
sources:
services: dhcpv6-client ssh
ports:
protocols:
masquerade: no
forward-ports: port=8080:proto=tcp:toport=80:toaddr=
source-ports:
icmp-blocks:
rich rules:
Seedbacklink

Recent Posts

TENTANG EMKA.WEB>ID

EMKA.WEB.ID adalah blog seputar teknologi informasi, edukasi dan ke-NU-an yang hadir sejak tahun 2011. Kontak: kontak@emka.web.id.

©2024 emka.web.id Proudly powered by wpStatically