LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-06-2022, 08:45 AM   #1
unInstance
Member
 
Registered: Jan 2020
Distribution: Slackware
Posts: 166

Rep: Reputation: Disabled
Firewall on a Default Gateway


There are a bunch of hosts in my LAN, all of them are connected directly to my router. One of the hosts (host A) is connected to a WireGuard server and is a default gateway to the other hosts within LAN. The router's IP address is a default gateway to the host A. Host A is responsible for routing the whole outcoming network traffic through a VPN server.

I want to secure host A by blocking all the ports that can be blocked. However a default gateway does not seem to have a port to allow connections to. What are the ports to be left unblocked on a default gateway? To control firewall, I use UFW.

Should I do it like https://askubuntu.com/questions/1613...-ip-forwarding, allow ALL incoming traffic within the LAN? Is it secure enough?
 
Old 09-07-2022, 11:19 AM   #2
lathos
LQ Newbie
 
Registered: Sep 2022
Distribution: parrot/debian/ubuntu/openbsd
Posts: 3

Rep: Reputation: 0
you can use ufw and set default as deny for outgoing and incoming sudo default deny incoming and sudo ufw default deny outgoing. Then using netstat -tulp finding any open ports. what I have done is use a random port for outbound request for my VPN so like 9871 and allowing outbound request for 9871 with ufw. if host A is responsible for handling requests of other clients allow your VPN to reach LAN while connected. Hopefully this helps!
 
Old 09-17-2022, 04:28 AM   #3
thugtomas
LQ Newbie
 
Registered: Sep 2022
Posts: 6

Rep: Reputation: 0
It depends on what is doing the internal routing
 
  


Reply

Tags
gateway, ufw, wireguard



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
adding default gateway and aditional gateway veru.naresh Linux - Networking 1 06-13-2012 07:34 AM
normal default gateway reapperas with openvpn redirect-gateway jonnytabpni Linux - Networking 2 04-23-2009 02:11 PM
lm10.0 gateway is set but when I reboot I have to set the gateway rharvey32 Mandriva 8 02-13-2006 01:35 PM
What is a gateway? can I have more than one gateway on a vlan? abefroman Linux - Networking 3 09-06-2005 10:43 AM
Odd problem: Gateway unreachable after certain amount of time (Win XP Gateway) SocialEngineer Linux - Networking 2 08-13-2004 12:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration