- Thread Starter
- #51
If you don't run a server a firewall is not needed.
To see the services you are running,
To see the services you are running,
Code:
sockstat -46
sockstat -46
kern.corefile=/tmp
kern.coredump=0
kern.coredump=/dev/null
I know exactly what services are running on all 7 of the laptops I have running FreeBSD. (I never have gotten around to converting my T61 Kali box to FreeBSD, but will eventually.)If you don't run a server a firewall is not needed.
To see the services you are running,...
root@bakemono:/ # sockstat -46
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
jitte firefox 6594 33 tcp4 192.168.1.24:36322 172.217.8.214:443
jitte firefox 6594 69 tcp4 192.168.1.24:19951 192.0.73.2:443
jitte firefox 6594 74 tcp4 192.168.1.24:41533 104.26.9.142:443
jitte firefox 6594 90 tcp4 192.168.1.24:19949 172.217.4.110:443
jitte firefox 6594 114 tcp4 192.168.1.24:43428 35.165.120.205:443
jitte firefox 3560 69 tcp4 192.168.1.24:20731 104.26.9.142:443
jitte firefox 3560 73 tcp4 192.168.1.24:45701 172.217.8.214:443
jitte firefox 3560 74 tcp4 192.168.1.24:21964 194.1.236.159:443
jitte firefox 3560 99 tcp4 192.168.1.24:32835 172.217.4.110:443
jitte firefox 3560 114 tcp4 192.168.1.24:43428 35.165.120.205:443
jitte firefox 3560 121 tcp4 192.168.1.24:52357 104.91.166.200:80
jitte firefox 3560 127 tcp4 192.168.1.24:12513 185.248.101.126:443
jitte firefox 3560 191 tcp4 192.168.1.24:59240 194.1.236.213:443
jitte firefox 2551 33 tcp4 192.168.1.24:56266 173.194.54.73:443
jitte firefox 2551 69 tcp4 192.168.1.24:20731 104.26.9.142:443
jitte firefox 2551 73 tcp4 192.168.1.24:45701 172.217.8.214:443
jitte firefox 2551 99 tcp4 192.168.1.24:32835 172.217.4.110:443
jitte firefox 2551 114 tcp4 192.168.1.24:43428 35.165.120.205:443
jitte firefox 96329 68 tcp4 192.168.1.24:32834 172.217.8.214:443
jitte firefox 96329 99 tcp4 192.168.1.24:32835 172.217.4.110:443
jitte firefox 96329 114 tcp4 192.168.1.24:43428 35.165.120.205:443
jitte firefox 96329 124 tcp4 192.168.1.24:32836 104.26.9.142:443
jitte firefox 96329 141 tcp4 192.168.1.24:32837 173.194.162.200:443
jitte firefox 96329 144 tcp4 192.168.1.24:32838 173.194.162.200:443
jitte firefox 96329 161 tcp4 192.168.1.24:32839 172.217.6.110:443
jitte firefox 96329 167 tcp4 192.168.1.24:32840 142.250.190.1:443
jitte firefox 94365 54 tcp4 192.168.1.24:43423 34.107.221.82:80
jitte firefox 94365 55 tcp4 192.168.1.24:23631 99.84.160.40:443
jitte firefox 94365 68 tcp4 192.168.1.24:30388 34.107.221.82:80
jitte firefox 93712 25 tcp4 192.168.1.24:41055 204.109.59.195:443
jitte firefox 93712 74 tcp4 192.168.1.24:41533 104.26.9.142:443
jitte firefox 93712 90 tcp4 192.168.1.24:19949 172.217.4.110:443
jitte firefox 93712 114 tcp4 192.168.1.24:43428 35.165.120.205:443
root sendmail 33515 3 tcp4 127.0.0.1:25 *:*
avahi avahi-daem 31540 14 udp4 *:5353 *:*
avahi avahi-daem 31540 15 udp6 *:5353 *:*
avahi avahi-daem 31540 16 udp4 *:40212 *:*
avahi avahi-daem 31540 17 udp6 *:50354 *:*
ntpd ntpd 26589 20 udp6 *:123 *:*
ntpd ntpd 26589 21 udp4 *:123 *:*
ntpd ntpd 26589 22 udp4 192.168.1.24:123 *:*
ntpd ntpd 26589 23 udp6 ::1:123 *:*
ntpd ntpd 26589 24 udp6 fe80::1%lo0:123 *:*
ntpd ntpd 26589 25 udp4 127.0.0.1:123 *:*
root@bakemono:/ #
root@bakemono:/ # pfctl -s all
FILTER RULES:
scrub in on em0 all fragment reassemble
block drop log all
block drop in on ! lo0 inet from 127.0.0.0/8 to any
block drop in on ! em0 inet from 192.168.1.0/24 to any
block drop in inet from 192.168.1.24 to any
block drop in on ! lo0 inet6 from ::1 to any
block drop in from no-route to any
block drop in from urpf-failed to any
block drop in quick on em0 inet from any to 255.255.255.255
block drop in log quick on em0 inet from 10.0.0.0/8 to any
block drop in log quick on em0 inet from 172.16.0.0/12 to any
block drop in log quick on em0 inet from 192.168.0.0/16 to any
block drop in log quick on em0 inet from 255.255.255.255 to any
block drop in quick inet6 all
block drop out quick inet6 all
block drop quick proto tcp from any port = 0 to any
block drop quick proto tcp from any to any port = 0
block drop quick proto udp from any port = 0 to any
block drop quick proto udp from any to any port = 0
block drop in log quick on em0 proto tcp from any to any port = ssh
block drop in log quick on em0 proto tcp from any to any port = telnet
block drop in log quick on em0 proto tcp from any to any port = smtp
block drop in log quick on em0 proto tcp from any to any port = http
block drop in log quick on em0 proto tcp from any to any port = pop3
block drop in log quick on em0 proto tcp from any to any port = sunrpc
block drop in log quick on em0 proto tcp from any to any port = ntp
block drop in log quick on em0 proto tcp from any to any port = exec
block drop in log quick on em0 proto tcp from any to any port = login
block drop in log quick on em0 proto tcp from any to any port = shell
block drop in log quick on em0 proto tcp from any to any port = printer
block drop in log quick on em0 proto tcp from any to any port = x11
block drop in log quick on em0 proto tcp from any to any port = x11-ssh
block drop in log quick on em0 proto udp from any to any port = ntp
block drop in log quick on em0 proto udp from any to any port = biff
block drop in log quick on em0 proto udp from any to any port = who
block drop in log quick on em0 proto udp from any to any port = syslog
block drop in log quick on em0 proto udp from any to any port = printer
block drop in log quick on em0 proto udp from any to any port = mdns
block drop in log quick on em0 proto udp from any to any port = x11
block drop in log quick on em0 proto udp from any to any port = x11-ssh
pass out on em0 proto tcp all flags S/SA modulate state
pass out on em0 proto udp all keep state
pass out on em0 proto icmp all keep state
STATES:
all tcp 192.168.1.24:43428 -> 35.165.120.205:443 ESTABLISHED:ESTABLISHED
all tcp 192.168.1.24:59330 -> 204.109.59.195:443 FIN_WAIT_2:FIN_WAIT_2
all tcp 192.168.1.24:54387 -> 104.78.127.155:443 TIME_WAIT:TIME_WAIT
all tcp 192.168.1.24:46509 -> 192.0.73.2:443 TIME_WAIT:TIME_WAIT
all tcp 192.168.1.24:14910 -> 104.26.9.142:443 ESTABLISHED:ESTABLISHED
all tcp 192.168.1.24:40342 -> 204.109.59.195:443 FIN_WAIT_2:FIN_WAIT_2
all tcp 192.168.1.24:46074 -> 204.109.59.195:443 FIN_WAIT_2:FIN_WAIT_2
INFO:
Status: Enabled for 1 days 10:49:40 Debug: Urgent
State Table Total Rate
current entries 7
searches 617292 4.9/s
inserts 3767 0.0/s
removals 3760 0.0/s
Counters
match 8825 0.1/s
bad-offset 0 0.0/s
fragment 0 0.0/s
short 0 0.0/s
normalize 0 0.0/s
memory 0 0.0/s
bad-timestamp 0 0.0/s
congestion 0 0.0/s
ip-option 0 0.0/s
proto-cksum 0 0.0/s
state-mismatch 0 0.0/s
state-insert 0 0.0/s
state-limit 0 0.0/s
src-limit 0 0.0/s
synproxy 0 0.0/s
map-failed 0 0.0/s
TIMEOUTS:
tcp.first 120s
tcp.opening 30s
tcp.established 86400s
tcp.closing 900s
tcp.finwait 45s
tcp.closed 90s
tcp.tsdiff 30s
udp.first 60s
udp.single 30s
udp.multiple 60s
icmp.first 20s
icmp.error 10s
other.first 60s
other.single 30s
other.multiple 60s
frag 30s
interval 10s
adaptive.start 60000 states
adaptive.end 120000 states
src.track 0s
LIMITS:
states hard limit 100000
src-nodes hard limit 10000
frags hard limit 5000
table-entries hard limit 200000
OS FINGERPRINTS:
762 fingerprints loaded
root@bakemono:/ #
I don't watch videos people post to make their case.Could you explain to me, why one would want a firewall running on a desktop? I have all my devices sitting behind my pfsense-router with restrictive firewall and suricata-IDS (for the servers). If I don't explicitly make a mistake, no device should ever (try to) communicate with the internet in a way not intended by me. And then there is still the firewall on my router.
Could either of you explain to me on the basis of facts alone, backed up with said facts, why I would not want a tight pf ruleset running on my laptops?
As a desktop user from FreeBSD 6.? I have firewall active all the time and I didn't have any problems and my wife running Windows on her computer all her computer life and she didn't have any problems too.Of course you can do it, the CPU and memory load has now become minimal and it does not give negative side effects (as long as you can physically connect to the console in case of troubles. Luxury you don't have managing remote machines, where a mistake can cost you hundreds of bucks, for service block and KVM rental over IP. And it happens).
As far as I'm concerned, desktop firewalls are essentially useful for logging (debugging), not much more.
As well known, if something is not there ...it cannot malfunction, this is especially true for services and software in general.
If I don't have an FTP server, I don't really need a firewall blocking its ports.
Just an example.
However, it would be interesting, conversely, for you to explain how the security of a normal desktop PC connected to a normal router (like FRITZ!Box or whatever) from 50-200 euros would improve.
In practice, and not just in theory.
How about more generally, why would you want to run a firewall behind a firewall.Could you explain to me, why one would want a firewall running on a desktop
I use firewall on laptop.How about more generally, why would you want to run a firewall behind a firewall.
Here is my real life example. I use a xSense firewall behind my cable modem.
But on my NanoBSD Wireless Access Point I also use pf for NAT.
So my though was, since I am using pf why not lock down wireless with a different set of rules. More restrictive.
It makes it harder for my wireless clients but I like it.
It all comes down to creating a security posture you are happy with.
Defence-in-depth. Layer upon layer. Any flaws, mistakes, vulnerabilities in the higher layers caught by the lower layers. Redundancy. (EDIT: oops posted this before reading all the replies, so just repeated what others have said).Could you explain to me, why one would want a firewall running on a desktop?
Why do you block these ranges? Or do you mean /24 instead of /8?Aeterna said:block default firefox connections at startup with pf (e.g. 3.0.0.0/8, 13.0.0.0/8, 34.0.0.0/8)
# sockstat -46
.Redundancy and Layered Security.How about more generally, why would you want to run a firewall behind a firewall.
I have WiFi and Bluetooth diabled on every device and run an Ethernet LAN. Makes it twice as hard to hack my wireless as yours.Here is my real life example. I use a xSense firewall behind my cable modem.
But on my NanoBSD Wireless Access Point I also use pf for NAT.
So my though was, since I am using pf why not lock down wireless with a different set of rules. More restrictive.
It makes it harder for my wireless clients but I like it.
pftop
and tcpdump
to see exactly what it wants and that only. I have a T400 with Intel Core2 Duo P8600 @ 2.4GHz and 8GB RAM that far exceeds the hardware of my Dell tower.I could have just stopped there but it's been a long time since Court Adjourned, Counselor.It all comes down to creating a security posture you are happy with.
I do not think so.Starting to sound like arguing in circles here.
Do firewalls protect against everything? No, of course not.
Do they help prevent things? Yes.
Does every single machine need to run one? Probably not.
So the point that I have been trying to make, is computer security is largely about what you feel you need. If running a firewall locally on your machine makes sense to you, it really doesn't matter what other people think or try to tell you.
And you're right. A firewall is not the End All Answer To All solution to computer security. I never said it was.I think firewalls are totally useless for this kind of issue,
That's why I'm going to runDo someone really think that a firewall or two or ten that allow connections to 8080 is more secure?
This is a non sense, until you make a list of external IP.
pftop
and tcpdump
to see exactly what it wants when I write a rule for it. I have to keep the interface loaded in Firefox and up 24 hours for the Touring Test.YES. My desktop is a laptop connected to cellular network.Therefore desktop firewall yes or no?
So we are in agreement.Security is a posture. You layer for best effect.
I use tools to mitigate application layer miscreants.
Custom hosts file and uBlock work well for my web usage.
1) reboot your desktop and runWhy do you block these ranges? Or do you mean /24 instead of /8?
I don't use a firewall on the desktop other than for logging. I think it's better to keep an eye on server processes with# sockstat -46
.
2) load firefox (configured with blank page at start so in theory firefox should not make any connections and (temporary) disabled extensions or configured without update checking)sockstat -46
sockstat -46s
So - you never install anything on the desktop machine? There's NO chance of a virus or malware or a repository being taken over that installs something on your machine that makes it start listening on port 80 or a high port?If you do not want to log, or restrict to 'someone' connecting to you (and you do not use Windows), what do in practice a desktop firewall?
How?
The answer is simple: nothing, if you do not have services (sharing something in your LAN) for example
covacat said:so in my experience the most fuckups were self induced