I'm new to Linux and more familiar with Windows I describe the situation with the latter so I can ask the proper question in given context. On Windows, if you run the local system firewall in strict Block mode, there are a few requirement to even have network connections to work properly. The default built-in firewall setup has a few rules usually called "Core Networking" that are present and enabled to ensure you have network connectivity going. For example:
Core Networking - Destination Unreachable Fragmentation Needed (ICMPv4-In) Core Networking - Dynamic Host Configuration Protocol (DHCP-In) Core Networking - Internet Group Management Protocol (IGMP-In) Core Networking Diagnostics - ICMP Echo Request (ICMPv4-In) (and their counterparts for Outbound) This is the bare minimum needed for the networking to work. The rest is app-domain configuration, i.e. whatever app and its functionality you need - you add custom rules.
My question then: does Linux operate similarly? For example, if I install default Arch, I will have no pre-configured iptables or firewall rules and I would need to make them myself. Is there some specific set of default required global rules I would need to have if I put my firewall into "Block all that is not explicitly allowed" to have core networking available?
The reason I'm asking is I know some distros, especially the server ones, have such state by default - you have to explicitly allow/open ports you want or need. I had used quite a few of them that were provided with the VPS/VDS. The thing I dont know is the intricacies of how that was set up. I dont have much experience to make educated conclusion. Obviously I know how to make global iptabels rule that rejects all incoming data on any port and I know how to make exception for port 22, for example. What I dont know is if there is something besides that, behind the scene, I need to setup, similar to the example with Windows above.
I've tried something like:
iptables -F iptables -P INPUT DROP iptables -A INPUT -i lo -p all -j ACCEPT iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT iptables -A INPUT -j DROP But now this wont even allow outgoing stuff like simple ping ip.ip.ip.ip.
What I'm missing?