-
llua
sounds like a weird ask, to have a jail with its own network stack, have it's firewall not be in said stack.
-
mjp
why is that weird? if a jail is compromised then its much better if any blocked outbound connections are not configurable from within the jail
-
mjp
-
llua
have you tried setting rules referencing the jail's host-side interface?
-
luke_jobless_sb
mjp: isn't this the other way around? my firewall is done at the host.
-
mjp
llua: no still making a plan at this stage, interface names seems logical providing each jail has a fixed interface name on the host system
-
mjp
luke_jobless_sb: are you using vnet jails? they have their own network stack and can run pf inside
-
bjorn3
how do I log failed login attempts in /var/log/auth.log?
-
voy4g3r2
bjorn3: is it a remote login failure or a local one?
-
bjorn3
local
-
voy4g3r2
local - typically handled in syslog.conf
-
voy4g3r2
remote - sshd_config (if ti is remote ssh)
-
voy4g3r2
there is a configuration file update, should have notes within those files. then a simple restart of the logging service and should be good to go
-
bjorn3
auth.info;authpriv.info is used for /var/log/auth.log in /etc/syslog.conf already. what should i add to log auth failures?
-
voy4g3r2
bjorn3: you want to increase the logging levels from INFO
-
bjorn3
voy4g3r2: with auth.debug;authpriv.debug i don't see any difference
-
voy4g3r2
let me step back a second.. what error logging are you trying to capture.. local / console or you doinmg through ssh?
-
bjorn3
if there is a local login failure, i would like to get a log message for this.
-
voy4g3r2
hav eyou tried to move from DEBUG (as that is low level stuff) to say ERR? I am referencing this section, as i am helping out:
docs.freebsd.org/en/books/handbook/config/#configtuning-syslog
-
bjorn3
auth.err;authpriv.err doesn't help, nor does auth.*;authpriv.*
-
voy4g3r2
and you are restarting the service?
-
bjorn3
yes, i'm doing "service syslogd restart" every time.
-
voy4g3r2
try adding this.. sysrc syslogd_flags="-vv"
-
voy4g3r2
and do again.. maybe it will "show" something
-
voy4g3r2
this will add flags in /etc/rc.conf for the syslogd service
-
voy4g3r2
so when you do a restart, it will "append" these flags to it
-
bjorn3
did that, i'm now getting a authpriv.notice for the sudo cat that i used to read auth.log, but still nothing for the failed login attempts.
-
voy4g3r2
you seeing anything in /var/log/security?
-
bjorn3
Oct 9 15:09:15 newsyslog[713]: logfile first created
-
bjorn3
is the only line in /var/log/security
-
voy4g3r2
do you see ANY entries in auth.log, like this: Oct 20 16:21:28 momas su[49873]: chrisdavidson to root on /dev/pts/3
-
bjorn3
yes, successful sudo usage and successful logins are logged just fine.
-
bjorn3
Oct 25 15:37:43 <auth.info> login[25821]: login on pts/0 as bjorn
-
bjorn3
Oct 25 15:37:49 <authpriv.notice> sudo[25825]: bjorn : TTY=pts/0 ; PWD=/home/bjorn/ ; USER=root ; COMMAND=/bin/cat /var/log/auth.log
-
voy4g3r2
Oct 25 09:39:57 momas su[60461]: BAD SU chrisdavidson to root on /dev/pts/2
-
voy4g3r2
when you do a 'su' and give a bad password.. does it show this?
-
voy4g3r2
for the record, i have NOT touched the basic configuration /etc/syslong.conf
-
Tenkawa
hmm it works on my box
-
Tenkawa
Oct 25 09:40:35 bsdrock5 sshd[1946]: error: PAM: Authentication error for illegal user na2 from
-
voy4g3r2
Tenkawa: thanks for confirmation
-
voy4g3r2
i am getting the error messages, so it is odd you are not bjorn3
-
bjorn3
if i do su i get a BAD SU message already without entering a password as i'm not in wheel.
-
voy4g3r2
hence your question :)
-
bjorn3
sudo also seems to log a message, but login doesn't.
-
dch
cperciva: ping
-
Tenkawa
voy4g3r2: I didn't have to change anything... I am curious to ask bjorn3 this: what version of FreeBSD is this?
-
bjorn3
(unrelated, but i just noticed that you can ctrl-z login on a tty and brick said tty until you send SIGCONT to login as root)
-
bjorn3
Tenkawa: 14.1-RELEASE
-
Tenkawa
interesting indeed...
-
bjorn3
i installed it a couple of weeks ago and i don't think i changed anything related to this.
-
voy4g3r2
Tenkawa: agree, it helps with context, while it sucks for bjorn3.. i am thinking to myself.. did I change anything
-
voy4g3r2
bjorn3: maybe i missed it, but if you ssh into box and give a bad password.. does it log?
-
Tenkawa
voy4g3r2: yeah I just installed these 2 boxes a week ago
-
voy4g3r2
-
voy4g3r2
because the login(1) should be sending the error message to that auth.log
-
Tenkawa
Both are arm64 boxes of various types that I'm working on
-
voy4g3r2
this should be cpu independent.. i confirmed on a raspberry pi and an x86 box
-
Tenkawa
yeah.. it was just context that these were new installs...
-
Tenkawa
(nothing really facy)
-
voy4g3r2
always important to know about
-
Tenkawa
er fancy
-
voy4g3r2
bjorn3: i am sorry, i think i am "stuck" at this time and maybe someone with more knowledge than me, can step in
-
Tenkawa
I did look and my auth.log is logging a lot
-
Tenkawa
bjorn3: I will "assume" there is a syslogd -s process running right?
-
bjorn3
is every program supposed to log auth failure individually on freebsd or is there an option for pam_unix to log auth failure like is the default on at least the debian family of linux systems?
-
bjorn3
Tenkawa: yes, syslogd -vv is running
-
Tenkawa
hmm I wonder if I'm getting the messages then because I'm running in debug mode... let me change and check
-
bjorn52
(web.libera.chat disconnected me and then picked a different nick when reconnecting as bjorn3 is already in use)
-
Tenkawa
bjorn52: not sure if you saw last msg
-
Tenkawa
[09:52:38] Tenkawa: hmm I wonder if I'm getting the messages then because I'm running in debug mode... let me change and check
-
Tenkawa
testing now
-
bjorn52
yeah, that message i saw
-
Tenkawa
my syslogd was running with -s
-
Tenkawa
just turned off.. restarting and about to try again
-
Tenkawa
Nah still logs it
-
Tenkawa
ct 25 09:58:32 bsdrock5 sshd[1914]: Failed keyboard-interactive/pam for invalid user na2 from
-
bjorn3
and if you enter a wrong password in the `login` program?
-
Tenkawa
that was on console
-
Tenkawa
let me trry ssh
-
bjorn3
why does it say sshd if you were on a console?
-
Tenkawa
oh no you right
-
Tenkawa
I had the uart on other con
-
Tenkawa
just a sec... no display so I have to login then uart over
-
Tenkawa
yeah nothing on that one
-
Tenkawa
Let me oh.. think I found it... just a sec
-
Tenkawa
half of it worked... it logs everything but the login attempt still...
-
Tenkawa
very odd
-
bjorn3
yeah. i also tried the pam_unix debug option, but that is way too verbose and still doesn't show the authentication failure and the target user on a single line, so it is effectively useless when multiple people are logging in at the same time.
-
Tenkawa
oh.. it worked that time
-
Tenkawa
Oct 25 10:13:35 bsdrock5 login[1902]: 1 LOGIN FAILURE ON ttyu0, na
-
Tenkawa
I used adding console to syslog.conf
-
Tenkawa
there's this part
-
Tenkawa
# uncomment this to log all writes to /dev/console to /var/log/console.log
-
Tenkawa
# touch /var/log/console.log and chmod it to mode 600 before it will work
-
Tenkawa
that ended up in both console.log and auth.log now
-
bjorn3
doesn't work for me
-
Tenkawa
Very odd indeed
-
Tenkawa
grep ttyu0 auth.log | grep -i login | wc -l
-
Tenkawa
17
-
Tenkawa
I've beenusing it a fair bit over the last 2 days lol
-
bjorn3
never mind, i made the wrong syslog.conf change.
-
bjorn3
with console.info /var/log/console.log it shows up in console.log just fine.
-
Tenkawa
yeah it took a few minutes here
-
Tenkawa
the dates/clock seemed out of sync
-
bjorn3
is it allow to have multiple syslog.conf lines for different filters with the same output log file?
-
Tenkawa
That I do not know
-
Tenkawa
I'm out of date on editing syslog by hand...
-
bjorn3
also it seems to be possible to bypass the logging for sudo by doing ctrl-z and then kill -9 %1
-
bjorn3
ah, auth.log still logs it in that case.
-
sfox
How do I know I'm not a robot? All these tech companies seem sure of it. How do /you/ know your not a robot for that matter?
-
sfox
We could all be robots and not even know it.
-
mzar
sfox: as a robot, would you run FreeBSD or something else ?
-
vkarlsen
He'd probably run QNX
-
sfox
Why is that?
-
trashboat
ahh QNX...really miss having it in my pocket
-
sfox
Are you sure your not a robot?
-
Tenkawa
Heh.. QNX.. I haven't ran that in years
-
luke
hello
-
luke
my antispoof interferes with my local client to its bouncer. what
-
luke_jobless_sb
is this something common?\
-
oxbar
luke_jobless_sb: can you re-explain.. somebody should be able to help
-
luke_jobless_sb
I have a bouncer in my server. I enabled antispoofing. Antispoofing on loop and NIC distrupted my bouncer. I want to know if this is something to do with the nature of a bouncer before troubleshooting.
-
luke_jobless_sb
I meant that bouncer alone works fine but I cannot get my client to connect
-
rwp
When you say you "enabled antispoofing" to me that means you have "antispoof quick for { $ext_if, lo0 } inet" in your /etc/pf.conf file. Does it mean the same thing to you?
-
rwp
Antispoofing blocks packets that arrive on an interface with a source that should not be arriving on that interface. If enabling it blocks something then something on your network is misconfigured.
-
s2r
Hi! I'm trying to do a refresh of a replication using zrep but I get an error after issuing the command zrep refresh zroot/jails/ubuntu2. "cannot set property for 'zroot/jails/ubuntu2': permission denied"
-
s2r
I ran the command via sudo.
-
luke_jobless_sb
rwp: sounds like worth to fix my network instead of disabling antispoof
-
rwp
luke_jobless_sb, At the least understanding what's happening.
-
ivy
does anyone know the security implications of setting net.inet6.icmp6.nd6_onlink_ns_rfc4861=1? apparently this is required for certain kinds of PtP Ethernet interfaces that cause FreeBSD to use GUA addresses for NS/NA instead of link local, but i can't find any specific documentation