Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Winkle-Daddy
Mar 10, 2007
Ugh, hopefully this is the right thread, but I've got an iptables issue that I'm having one hell of a time getting to work right. The scenario is this: I have a bunch of computers on a LAN, and I want these computers to only be able to talk on the LAN except when I ping a specific port (e.g. port knocking). These are the rules I've got:
code:
iptables -N WAN

iptables -P OUTPUT DROP
iptables -A OUTPUT -m recent --name WANON --rcheck -j WAN
iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -d 192.168.0.0/16 -j ACCEPT

iptables -P INPUT DROP
iptables -A INPUT -m recent --name WANON --rcheck -j WAN
iptables -A INPUT -p udp --dport 1111 -m recent --name WANON --set -j DROP
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -s 192.168.0.0/16 -j ACCEPT

iptables -A WAN -j ACCEPT
This works fine:
code:
# ping -c 2 192.168.1.104
PING 192.168.1.104 (192.168.1.104) 56(84) bytes of data.
64 bytes from 192.168.1.104: icmp_seq=1 ttl=64 time=0.297 ms
64 bytes from 192.168.1.104: icmp_seq=2 ttl=64 time=0.352 ms

--- 192.168.1.104 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.297/0.324/0.352/0.032 ms
I can still ping hosts on the LAN, but I can't ping google:
code:
# ping -c 2 google.com
PING google.com (74.125.227.162) 56(84) bytes of data.
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
^C
--- google.com ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 5987ms
So far so good. To verify things are working how I want:
code:
# iptables -L -v -n
Chain INPUT (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 WAN        all  --  *      *       0.0.0.0/0            0.0.0.0/0           recent: CHECK name: WANON side: source 
    0     0 DROP       udp  --  *      *       0.0.0.0/0            0.0.0.0/0           udp dpt:1111 recent: SET name: WANON side: source 
   87  6624 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
    0     0 ACCEPT     all  --  *      *       192.168.0.0/16       0.0.0.0/0           

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy DROP 2 packets, 168 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 WAN        all  --  *      *       0.0.0.0/0            0.0.0.0/0           recent: CHECK name: WANON side: source 
   46  6536 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
    1    56 ACCEPT     all  --  *      *       0.0.0.0/0            192.168.0.0/16          

Chain WAN (2 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0
You can see that the OUTPUT chain dropped my two packets to Google, as expected. Now I want to enable the WAN chain (from another host):
code:
$ sudo hping3 192.168.1.102 --udp -c 1 -p 1111
HPING 192.168.1.102 (eth0 192.168.1.102): udp mode set, 28 headers + 0 data bytes

--- 192.168.1.102 hping statistic ---
1 packets transmitted, 0 packets received, 100% packet loss
round-trip min/avg/max = 0.0/0.0/0.0 ms
Again, as expected, confirmed by iptables:
code:
...cutting out everything but the last chain...
Chain WAN (2 references)
 pkts bytes target     prot opt in     out     source               destination         
   58  6136 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0
Everything is now flowing over the WAN chain. However...
code:
# ping google.com -c 1
PING google.com (173.194.46.9) 56(84) bytes of data.
ping: sendmsg: Operation not permitted
^C
--- google.com ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 1470ms
Is anyone able to give me a pointer for what I should do here to be able to accomplish my goal of a port knock that enables the internet?

e: I know other tools exist that can assist in doing this, but for complicated reasons I need to accomplish this with things available on the host, which is why iptables + recent was an obvious; albeit obnoxious choice.

Winkle-Daddy fucked around with this message at 23:38 on Jun 18, 2014

Adbot
ADBOT LOVES YOU

spoon daddy
Aug 11, 2004
Who's your daddy?
College Slice
Started as a question but gently caress it. Unity is the biggest piece of poo poo that hides basic functionality and should be aborted.

effika
Jun 19, 2005
Birds do not want you to know any more than you already do.

spoon daddy posted:

Started as a question but gently caress it. Unity is the biggest piece of poo poo that hides basic functionality and should be aborted.

Alrighty. Give Cinnamon a try?

Winkle-Daddy
Mar 10, 2007

effika posted:

Alrighty. Give Cinnamon a try?

I prefer openbox, but to each his own.

I would blow Dane Cook
Dec 26, 2008
Probation
Can't post for 5 hours!
E: forget about it

I would blow Dane Cook fucked around with this message at 07:27 on Jun 19, 2014

telcoM
Mar 21, 2009
Fallen Rib

Winkle-Daddy posted:

Ugh, hopefully this is the right thread, but I've got an iptables issue that I'm having one hell of a time getting to work right. The scenario is this: I have a bunch of computers on a LAN, and I want these computers to only be able to talk on the LAN except when I ping a specific port (e.g. port knocking).
[...]
I can still ping hosts on the LAN, but I can't ping google:
code:
# ping -c 2 google.com
PING google.com (74.125.227.162) 56(84) bytes of data.
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
^C
--- google.com ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 5987ms
So far so good. To verify things are working how I want:
[...]
Everything is now flowing over the WAN chain. However...
code:
# ping google.com -c 1
PING google.com (173.194.46.9) 56(84) bytes of data.
ping: sendmsg: Operation not permitted
^C
--- google.com ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 1470ms

In your configuration, iptables will not stop your ping command from trying to send the pings; it will just silently eat the outgoing ping messages. The "ping: sendmsg: Operation not permitted" makes me think something else is stopping the ping command from running properly. Perhaps you have SELinux enabled?

If you have SELinux enabled, you should monitor the audit logs (normally at /var/log/audit) when running your ping command. If you can see AVC deny messages regarding "sendmsg" appearing while you're trying to ping, then that's the cause.

RFC2324
Jun 7, 2012

http 418

I have gotten the 'operation not permitted' coming from VMs as well, particularly from VirtualBox.

Its listed as a known issue that VBox guests do not send pings properly.

Winkle-Daddy
Mar 10, 2007

telcoM posted:

In your configuration, iptables will not stop your ping command from trying to send the pings; it will just silently eat the outgoing ping messages. The "ping: sendmsg: Operation not permitted" makes me think something else is stopping the ping command from running properly. Perhaps you have SELinux enabled?

If you have SELinux enabled, you should monitor the audit logs (normally at /var/log/audit) when running your ping command. If you can see AVC deny messages regarding "sendmsg" appearing while you're trying to ping, then that's the cause.

Thanks guys, they are vm's, but when I flush iptables I can ping Google just fine. I'm not sure if that negates your theory or not, but I'll do some more reading today.

Elias_Maluco
Aug 23, 2007
I need to sleep
For some reason, all of a sudden, my Mint 15 (with KDE) date/time setting went nuts.

I start it and the clock is 3 hours ahead. I correct it and then next time I restart, it is 3 hours ahead again.

What can be happening here?

Experto Crede
Aug 19, 2008

Keep on Truckin'

Elias_Maluco posted:

For some reason, all of a sudden, my Mint 15 (with KDE) date/time setting went nuts.

I start it and the clock is 3 hours ahead. I correct it and then next time I restart, it is 3 hours ahead again.

What can be happening here?

Is your BIOS clock set correctly?

Winkle-Daddy
Mar 10, 2007

Elias_Maluco posted:

For some reason, all of a sudden, my Mint 15 (with KDE) date/time setting went nuts.

I start it and the clock is 3 hours ahead. I correct it and then next time I restart, it is 3 hours ahead again.

What can be happening here?

Is ntpd crashing? I had this happen on Fedora 20 for a work computer a while ago, I never did figure it out, so I just added a cron to restart it every hour.

evol262
Nov 30, 2010
#!/usr/bin/perl
You're checking whether the source address (which is almost certainly not 173.194.46.9) is in your list of recents. It isn't. And it's not related or established or in the subnet, and you haven't allowed icmp echo-request or echo-reply, so you're getting blocked when you try to open an icmp socket.

If you want to port knock on output to unspecified, previously unseen hosts (your rules would work fine if you wanted to say "this host from a subnet that's not on 192.168.0.0/24 hit me on UDP 1111, so allow outbound connections to that host", which you can verify by adding a host on another subnet, like 192.168.1.0/24, adding routes, and hpinging 1111), you need knockd. I know this isn't built in and you have to install a package, but it's the appropriate solution.

Or if you can't, you can trivially use the LOG target and --log-prefix='whatever' and watch syslog (or dump iptable logs to their own log) with a long-running (systemd/upstart ideally) script which inserts iptables rules to allow outbound. You could probably do this in 30 lines or less of any language you want.

Elias_Maluco
Aug 23, 2007
I need to sleep

Experto Crede posted:

Is your BIOS clock set correctly?

I think it is (cant reboot now to be sure, but since I didnt touched BIOS settings for many months, I guess it should be?).


Winkle-Daddy posted:

Is ntpd crashing? I had this happen on Fedora 20 for a work computer a while ago, I never did figure it out, so I just added a cron to restart it every hour.

"Set date and time automatically" is currently off and if I try to turn it on I get this error: "Unable to authenticate/execute the action: 6,"

Winkle-Daddy
Mar 10, 2007

evol262 posted:

You're checking whether the source address (which is almost certainly not 173.194.46.9) is in your list of recents. It isn't. And it's not related or established or in the subnet, and you haven't allowed icmp echo-request or echo-reply, so you're getting blocked when you try to open an icmp socket.

If you want to port knock on output to unspecified, previously unseen hosts (your rules would work fine if you wanted to say "this host from a subnet that's not on 192.168.0.0/24 hit me on UDP 1111, so allow outbound connections to that host", which you can verify by adding a host on another subnet, like 192.168.1.0/24, adding routes, and hpinging 1111), you need knockd. I know this isn't built in and you have to install a package, but it's the appropriate solution.

Or if you can't, you can trivially use the LOG target and --log-prefix='whatever' and watch syslog (or dump iptable logs to their own log) with a long-running (systemd/upstart ideally) script which inserts iptables rules to allow outbound. You could probably do this in 30 lines or less of any language you want.

Ahhh, that makes sense given the capacity that recent is typically used in. And here I thought I could be clever :(

The man page lays it out pretty well, I'm not sure why on my first read I didn't make the connection. I guess I'll be writing my own script for this. Oh well, It's been a while since I've needed to actually accomplish anything like that.

Winkle-Daddy fucked around with this message at 16:43 on Jun 19, 2014

Winkle-Daddy
Mar 10, 2007

Elias_Maluco posted:

"Set date and time automatically" is currently off and if I try to turn it on I get this error: "Unable to authenticate/execute the action: 6,"

Try running:
code:
service ntpd status
If it's not running, try (as root):
code:
service ntpd start
If your clock is automagically fixed, then try adding a cron to restart ntpd every so often.

evol262
Nov 30, 2010
#!/usr/bin/perl

Elias_Maluco posted:

I think it is (cant reboot now to be sure, but since I didnt touched BIOS settings for many months, I guess it should be?).


"Set date and time automatically" is currently off and if I try to turn it on I get this error: "Unable to authenticate/execute the action: 6,"

You may also want to try "ntpdate your.ntp.server" (or 0.fedora.pool.ntp.org or another valid public server). ntpd will refuse to sync in most configurations if the time is really far off.

Elias_Maluco
Aug 23, 2007
I need to sleep

Winkle-Daddy posted:

Try running:
code:
service ntpd status
If it's not running, try (as root):
code:
service ntpd start
If your clock is automagically fixed, then try adding a cron to restart ntpd every so often.

I got "ntpd: unrecognized service".

evol262 posted:

You may also want to try "ntpdate your.ntp.server" (or 0.fedora.pool.ntp.org or another valid public server). ntpd will refuse to sync in most configurations if the time is really far off.

I get a "ntpdate[9755]: bind() fails: Permission denied", no matter what server I use.

Longinus00
Dec 29, 2005
Ur-Quan

Elias_Maluco posted:

For some reason, all of a sudden, my Mint 15 (with KDE) date/time setting went nuts.

I start it and the clock is 3 hours ahead. I correct it and then next time I restart, it is 3 hours ahead again.

What can be happening here?

Do you dual boot into windows on this machine?

Winkle-Daddy
Mar 10, 2007

Elias_Maluco posted:

I got "ntpd: unrecognized service".
I think on Ubuntu/Debian (which Mint is based on) it might just be ntp, not ntpd. My bad. You can also see if there's an init script for it (ls -al /etc/init.d/ | grep ntp). If there is one, just do sudo /etc/init.d/<script> restart

quote:

I get a "ntpdate[9755]: bind() fails: Permission denied", no matter what server I use.
You have to do this as root, ntp runs on a privileged port.

Elias_Maluco
Aug 23, 2007
I need to sleep

Longinus00 posted:

Do you dual boot into windows on this machine?

I do have windows 7 installed in another partition, but I havent booted into it for months.

Winkle-Daddy posted:

I think on Ubuntu/Debian (which Mint is based on) it might just be ntp, not ntpd. My bad. You can also see if there's an init script for it (ls -al /etc/init.d/ | grep ntp). If there is one, just do sudo /etc/init.d/<script> restart

"npt" gives the same error and "ls -al /etc/init.d/ | grep ntp" gives nothing.;

Winkle-Daddy posted:

You have to do this as root, ntp runs on a privileged port.

Now it worked, it gave me "timestamp too far in the future: Jun 19 15:59:28 2014" (its 13:00 right now)

Elias_Maluco fucked around with this message at 17:16 on Jun 19, 2014

Winkle-Daddy
Mar 10, 2007

Elias_Maluco posted:

Now it worked, it gave me "timestamp too far in the future: Jun 19 15:59:28 2014" (its 13:00 right now)

Is ntp running?
code:
ps aux | grep ntp | grep -v grep
If it is, you could try restarting it by sending a SIGHUP to the process ID
code:
ps aux | grep ntp | grep -v grep | awk '{print $2}' | sudo xargs kill -1
If this doesn't help, I won't be of any further help without getting hands on and doing things like rebooting :( Maybe some smarter goon can do better.

Elias_Maluco
Aug 23, 2007
I need to sleep

Winkle-Daddy posted:

Is ntp running?
code:
ps aux | grep ntp | grep -v grep
If it is, you could try restarting it by sending a SIGHUP to the process ID
code:
ps aux | grep ntp | grep -v grep | awk '{print $2}' | sudo xargs kill -1
If this doesn't help, I won't be of any further help without getting hands on and doing things like rebooting :( Maybe some smarter goon can do better.

ps aux | grep ntp | grep -v grep returns empty too :(

evol262
Nov 30, 2010
#!/usr/bin/perl

Elias_Maluco posted:

Now it worked, it gave me "timestamp too far in the future: Jun 19 15:59:28 2014" (its 13:00 right now)

What gave you this.

Was it:

"sudo: timestamp too far in the future"? Or ntp?

Is the date correct now?

If it was sudo (probably), you'll need to fsck to fix the timestamp from the system clock, and the easiest means for that would be rebooting

Also:

code:
ps aux | grep [n]tp
prevents grep from showing up in its own list.

Ninja Rope
Oct 22, 2005

Wee.

evol262 posted:

code:
ps aux | grep [n]tp
prevents grep from showing up in its own list.

Only as long as there's nothing named "ntp" in the current directory (which may be hard to guarantee when used in aliases/shell scripts). psgrep is the better answer if it's available.

evensevenone
May 12, 2001
Glass is a solid.

Suspicious Dish posted:

I tried looking for you in the Compiz source and got stuck in a maze of twisty plugins, all alike. Sorry.

Thanks. It seems pretty nuts, since all the other settings end up in gconftool.

telarium4
Jul 23, 2010

General_Failure posted:

So you're saying I might have to manually set a virtual desktop?
I'm using lubuntu, and more specifically LXDE. It's a personal choice, not a necessity.

For what it's worth, I'm using Debian sid with an experimental repository. I pulled the 14.6 driver from experimental - and although it has a few quirks - it seems to be running multi-monitor (Xinerama) in CCC with no issues. Radeon R7 260X here; I realize you're a couple generations behind with respect to your video card.

As far as sid and experimental, I'm counting the days until my computer implodes and I need another hour for a netisnt back to Wheezy or Jessie. This is not a production machine.

Edit: Xfce, here.

Snorri
Apr 23, 2002
Stupid question for Ubuntu 12.04 3.5.0-51-generic

So my iptables were all happy campers up until 2 weeks ago when DHCP suddenly kicked the bucket when I let the disk fill up (or at least this is what I assume triggered it). After cleaning up the disk and rebooting DHCP was still dead and my changes to iptables were not taking hold. If I apply iptables changes I lose all networking on this box. A swift reboot will take me back to old firewall rules and a working network. What is my first step in figuring out what is going on here? I get no errors whether or not I apply iptable changes via webmin or via command line iptables-restore.

ZippySLC
Jun 3, 2002


~what is art, baby dont post, dont post, no more~

no seriously don't post
Alright, this is definitely a Puppet 101 question, and I am sure that the Puppet docs have an answer for this and I am just dense and can't find it. Also, I hope this is the right thread for this question.

I'm trying to teach myself Puppet, with the goal of managing the VPS I run with it. Additionally, when I get a better grasp on things, I want to deploy it at work. So while my home deployment will be small, I want to learn how to "do it right."

I have a vanilla Puppet server and an agent. Both are managed through Puppet.

Right now, on my agent node, I'm configuring Apache.

I've got code like this in my nodes.pp:

code:
node 'hostname' {
  include 'ntp'
  include 'sudo'
  class { 'vim':
    opt_misc => ['nu','fo=tcq','nocompatible','modeline','tabstop=2','expandtab','softtabstop=2','shiftwidth=2','backspace=indent,eol,start'],
  }
  class { 'apache':
    serveradmin => 'whatever',
  }
  apache::vhost{ 'www.example.com':
    default_vhost   => true,
    docroot         => '/var/www/html/www.example.com',
    logroot         => '/var/log/httpd/www.example.com',
    access_log_file => 'access_log',
    error_log_file  => 'error_log',
    override        => 'all',
  }

  some more vhosts
  ...
}
It seems like best practice is to put all of these configs in some separate directory so I could end up with something like:

code:
node 'hostname' {
  include 'ntp'
  include 'sudo'
  class { 'vim':
    opt_misc => $std_vim_ops
  }
  include 'vhost1'
  include 'vhost2'
}
Now I guess I can make modules for each vhost, but that doesn't seem right. How would I go about doing this? (Bear in mind that my second block of code is just a rough approximation and I don't really know the right way to write out what I want to do.)

Thanks for your patience. I've been searching for answers and not really understanding what I come up with.

ChaiCalico
May 23, 2008

This is something stupid and i know it. Main linux pc is running mint 16, chromebook is on chrbuntu who knows what. I can't connect from the chrome book to the mint box via RDP/VNC (using remmina as a client), FTP, or see its exported nfs shares. But i can ping both ways fine. Firewall is not installed in the mint box, hosts.allow and deny are default (no entries).

Longinus00
Dec 29, 2005
Ur-Quan

madpanda posted:

This is something stupid and i know it. Main linux pc is running mint 16, chromebook is on chrbuntu who knows what. I can't connect from the chrome book to the mint box via RDP/VNC (using remmina as a client), FTP, or see its exported nfs shares. But i can ping both ways fine. Firewall is not installed in the mint box, hosts.allow and deny are default (no entries).

Have you considered running tcpdump on your main computer while trying to connect with the other one?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Why can't I run mtr from the network I'm currently on?

code:
fletch@fletch-linuxmint16 ~ $ mtr --report fletchowns.net
Start: Wed Jun 25 18:39:09 2014
HOST: fletch-linuxmint16            Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- 10.0.2.2                   0.0%    10    0.2   0.5   0.2   0.7   0.0
  2.|-- ???                       100.0    10    0.0   0.0   0.0   0.0   0.0

Salt Fish
Sep 11, 2003

Cybernetic Crumb

fletcher posted:

Why can't I run mtr from the network I'm currently on?

code:
fletch@fletch-linuxmint16 ~ $ mtr --report fletchowns.net
Start: Wed Jun 25 18:39:09 2014
HOST: fletch-linuxmint16            Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- 10.0.2.2                   0.0%    10    0.2   0.5   0.2   0.7   0.0
  2.|-- ???                       100.0    10    0.0   0.0   0.0   0.0   0.0

You're blocking ICMP out?

evol262
Nov 30, 2010
#!/usr/bin/perl

Snorri posted:

Stupid question for Ubuntu 12.04 3.5.0-51-generic

So my iptables were all happy campers up until 2 weeks ago when DHCP suddenly kicked the bucket when I let the disk fill up (or at least this is what I assume triggered it). After cleaning up the disk and rebooting DHCP was still dead and my changes to iptables were not taking hold. If I apply iptables changes I lose all networking on this box. A swift reboot will take me back to old firewall rules and a working network. What is my first step in figuring out what is going on here? I get no errors whether or not I apply iptable changes via webmin or via command line iptables-restore.

Check whether iptables-save is actually saving the rules wherever Ubuntu keeps them.

What happens if you do it with the actual iptables command?

Is your dhcp setup backed by mysql or anything?

evol262
Nov 30, 2010
#!/usr/bin/perl

ZippySLC posted:

Alright, this is definitely a Puppet 101 question, and I am sure that the Puppet docs have an answer for this and I am just dense and can't find it. Also, I hope this is the right thread for this question.

I'm trying to teach myself Puppet, with the goal of managing the VPS I run with it. Additionally, when I get a better grasp on things, I want to deploy it at work. So while my home deployment will be small, I want to learn how to "do it right."

I have a vanilla Puppet server and an agent. Both are managed through Puppet.

Right now, on my agent node, I'm configuring Apache.

I've got code like this in my nodes.pp:

code:
node 'hostname' {
  include 'ntp'
  include 'sudo'
  class { 'vim':
    opt_misc => ['nu','fo=tcq','nocompatible','modeline','tabstop=2','expandtab','softtabstop=2','shiftwidth=2','backspace=indent,eol,start'],
  }
  class { 'apache':
    serveradmin => 'whatever',
  }
  apache::vhost{ 'www.example.com':
    default_vhost   => true,
    docroot         => '/var/www/html/www.example.com',
    logroot         => '/var/log/httpd/www.example.com',
    access_log_file => 'access_log',
    error_log_file  => 'error_log',
    override        => 'all',
  }

  some more vhosts
  ...
}
It seems like best practice is to put all of these configs in some separate directory so I could end up with something like:

code:
node 'hostname' {
  include 'ntp'
  include 'sudo'
  class { 'vim':
    opt_misc => $std_vim_ops
  }
  include 'vhost1'
  include 'vhost2'
}
Now I guess I can make modules for each vhost, but that doesn't seem right. How would I go about doing this? (Bear in mind that my second block of code is just a rough approximation and I don't really know the right way to write out what I want to do.)

Thanks for your patience. I've been searching for answers and not really understanding what I come up with.

Yes, best practice is to break out your configuration into small pieces. And to use classes for your vhosts (potentially with templates). But if you're only managing one how, I wouldn't worry about it too much.

Cidrick
Jun 10, 2001

Praise the siamese
Is anyone aware of a way to view the utilization of a remote NFS mount without actually mounting it? showmount only appears to show you what exported volumes are available to be mounted, and things like nfsstat and nfsiostat give all sorts of interesting metrics that don't really help me. A good old "df" will show it, but it requires mounting, which requires root.

Context: I'm trying to find a way for our monitoring environment to query a big NFS appliance that Doesn't Play Nicely With Others so we don't have the normal way of monitoring this stuff (SNMP, ssh, etc) that I would typically use.

jaegerx
Sep 10, 2012

Maybe this post will get me on your ignore list!


Cidrick posted:

Is anyone aware of a way to view the utilization of a remote NFS mount without actually mounting it? showmount only appears to show you what exported volumes are available to be mounted, and things like nfsstat and nfsiostat give all sorts of interesting metrics that don't really help me. A good old "df" will show it, but it requires mounting, which requires root.

Context: I'm trying to find a way for our monitoring environment to query a big NFS appliance that Doesn't Play Nicely With Others so we don't have the normal way of monitoring this stuff (SNMP, ssh, etc) that I would typically use.


Can you install anything on the NFS box at all?

Cidrick
Jun 10, 2001

Praise the siamese

jaegerx posted:

Can you install anything on the NFS box at all?

The NFS server? Not unless we pay Hitachi a lot of money, I'm told.

joe944
Jan 31, 2004

What does not destroy me makes me stronger.

evol262 posted:

Yes, best practice is to break out your configuration into small pieces. And to use classes for your vhosts (potentially with templates). But if you're only managing one how, I wouldn't worry about it too much.

Yeah, that would become quite unmanageable after a while. Best bet is to group your classes into "roles" so that you only need to include the role for a particular node. It gets a lot better when you store all of your server info in a database and start using hiera to classify the nodes.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Cidrick posted:

Is anyone aware of a way to view the utilization of a remote NFS mount without actually mounting it? showmount only appears to show you what exported volumes are available to be mounted, and things like nfsstat and nfsiostat give all sorts of interesting metrics that don't really help me. A good old "df" will show it, but it requires mounting, which requires root.

Context: I'm trying to find a way for our monitoring environment to query a big NFS appliance that Doesn't Play Nicely With Others so we don't have the normal way of monitoring this stuff (SNMP, ssh, etc) that I would typically use.
Can you screen-scrape the GUI? It's ghetto as hell, but probably your best bet if you don't have access to run things on the box.

Adbot
ADBOT LOVES YOU

Cidrick
Jun 10, 2001

Praise the siamese

Misogynist posted:

Can you screen-scrape the GUI? It's ghetto as hell, but probably your best bet if you don't have access to run things on the box.

Yeah, I haven't actually looked at it, but maybe it's possible to set up a service account and use curl to POST a login and then scrape screen output or something.

I was hoping there was a way via an RPC command or something to remotely query info about an NFS export that I just didn't know about :|

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply