Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #256153

FirewallD Masquerading and route forwarding

From Timothy M Butterworth <timothy.m.butterworth@gmail.com>
Newsgroups linux.debian.user
Subject FirewallD Masquerading and route forwarding
Date 2023-03-18 02:00 +0100
Message-ID <Gat5n-ddLk-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

All,

I have two network interfaces on my PC and I want to route the stub
interface to the internet facing interface and perform Masquerading. My
Internet facing NIC is set to use zone drop and my inside facing zone is
set to use zone trusted.

# enable routing
echo 1 > /proc/sys/net/ipv4/ip_forward

# verify IP forwarding is enabled.
cat  /proc/sys/net/ipv4/ip_forward
1

# Configure Masquerade zone
firewall-cmd --zone=drop --add-masquerade --permanent
firewall-cmd --reload

# check masquerade configuration
firewall-cmd --zone=drop --query-masquerade
yes

# Ping Test Internet facing NIC.
ping -4 www.google.com
6 packets transmitted, 6 received, 0% packet loss, time 5008ms

# Ping test internal facing NIC.
ping -4I enx0000000011f1 www.google.com
23 packets transmitted, 0 received, 100% packet loss, time 22532ms

When sourcing from the internal NIC the ping fails which leads me to
believe Masquerade is not working.

Am I missing something?

Tim
-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀

Back to linux.debian.user | Previous | NextNext in thread | Find similar | Unroll thread


Thread

FirewallD Masquerading and route forwarding Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2023-03-18 02:00 +0100
  Re: FirewallD Masquerading and route forwarding Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2023-03-19 00:20 +0100

csiph-web