Latest Server related questions

Score: 2
Alessandro Iaselli avatar
postfix/sendmail can't read main.cf file
eg flag

I'm trying to configure a mailserver, but when i run:

echo "test email" | mail -s "test" myemail@gmail.com -aFrom hello@mydomain.com

and check tail /var/log/mail.err I get Aug 8 13:36:37 localhost postfix/sendmail[7034]: fatal: open /etc/postfix/main.cf: Permission denied.

Here are /etc/postfix folder permissions:

root@localhost:~# ls -la /etc/postfix/
total 156
drwxr-x---   5 root vmail  4096 Aug  8 1 ...
Score: 0
ndd avatar
Make programs binded to other network interface use other gateway than default
ru flag
ndd

I would like for a program that binded to network interface that is not eth0 to use other default gateway when making connections.

ip rule add oif tun0 table 11
ip route add default via 10.3.33.20 table 11
ip route flush cache
ip rule list
0:      from all lookup local
32764:  from all iif tun0 lookup 11
32765:  from all oif tun0 lookup 11
32766:  from all lookup main
32767:  from all lookup default
Score: 0
OttoEisen avatar
Choice of NAT64 prefix
br flag

I'm about to deploy NAT64 and I noticed that it's possible to use your own prefix instead of the "well-known prefix". Now I can imagine complex scenarios with multiple NAT64 gateways serving different prefixes where that would be necessary. But for a rather simple configuration with 2 VRRP routers, is there any advantage to using your own prefix?

Score: 0
Nimafire avatar
How log commands executed by user
cn flag

First at all, I have working some years with snoopy and it's not what I need, also checking history file isn't a solution for me.

I have to give ROOT access to a developer to install a program on the server and I know that he will remove history after he exits session.

I need to check what commands he ran to protect server from abuse activity.

Any solution to logging commands?

Score: 2
shoddylik avatar
AWS - ssh to instance in private subnet
fo flag

I have 2 instances in AWS. One of them in a public subnet (bastion), the second one in a private subnet.

Both of them were launched with the same key pair (.pem file).

This is how I connect to the bastion:

ssh -i secret.pem ec2-user@public-ip

Works great, I am in.

Now, I want to ssh the instance in a private subnet. Googling says that I should forward the agent:

ssh -A ubuntu@private-ip

But unfortuna ...

Score: 1
Adrian avatar
.htaccess Remove first php url parameter if second exist
cn flag

This is my .htaccess code:

RewriteCond %{REQUEST_URI} !^/pages/ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)(/([^/]+))? pages.php?PAGE=$1&LINK=$3 [L]

*where $1 = profile and $3 = john-smith

This is works fine rewriting like https://example.com/profile/john-smith but I need a second rewrite rule like https://example.com/john-smith only if the seco ...

Score: 0
Redis is seeing legitimate connections as attacks - possibly due to reverse proxy?
gb flag

I'm running Redis for use with Rails and Action Cable. These all sit behind an Nginx reverse proxy. Currently whenever Redis is connected to, I get

# Possible SECURITY ATTACK detected. It looks like somebody is sending POST or Host: commands to Redis. This is likely due to an attacker attempting to use Cross Protocol Scripting to compromise your Redis instance. Connection aborted.

Is it possible the N ...

Score: 0
Leeloo avatar
Reduce server TTFB
eg flag

I have an application which uploads and reads files from another VPS (i.e. file server, Ubuntu 18.04). These servers are in the same network. The application (.NET core) uses SFTP protocol (SSH.net) for files reading/writing.

For a 5 Mb file it takes 3 seconds to load a file, more than 2 seconds of which is the TTFB (80% of total time).

Is there a way to reduce the TTFB and accelerate file transfer/ ...

Score: 1
Adam avatar
Configuring DKIM using DNS and hosting on VPS
ar flag

I'm using Mail Enable on my VPS and have copied the generated DKIM (see screenshot 1) to my DNS. (yes, I've restarted the VPS already): enter image description here

Now my DNS settings are configured at hosting company A, and point to the VPS I host at company B: enter image description here

The strange thing now is that when I try and check the DKIM validity, dmarcanalyzer.com says it's incorrect whereas mxtoolbox.com shows it's correct.

The DKIM report I ge ...

Score: 0
Random End of Stream encountered before parsing was completed occurs after changing server
lk flag

ClickOnce client (.NET 2.0, .NET Remoting, IIS) randomly returns unhandled exception of "End of Stream encountered before parsing was completed" for some users at the start up.

Some days program starts ok, some days it won't. Everything worked for years, but problem began after changing server out of customer's own environment. Program's version is exactly the same.

I think the network route is long ...

Score: 0
mike avatar
Disk issues: irq_stat 0x20000000, host bus error
bd flag

When copying large files (50+GB) from an NVMe disk to a SATA 7200rpm HDD disk I see the following error in the logs on a fully patched Ubuntu 20.04:

Aug 08 00:45:59 host kernel: ata6.00: exception Emask 0x20 SAct 0x0 SErr 0x0 action 0x6 frozen
Aug 08 00:45:59 host kernel: ata6.00: irq_stat 0x20000000, host bus error
Aug 08 00:45:59 host kernel: ata6.00: failed command: WRITE DMA EXT
Aug 08 00:45:59 ...
Score: 2
Nginx redirect to another domain without trailing uri
us flag

I am trying to get http://foo.mydomain.xyz/one/two/three.json by calling http://bar.mydomain.xyz/cat/one/two/three.json. I am using the following configuration:

server {
        listen 80;
        listen [::]:80;
        server_name bar.mydomain.xyz;
        absolute_redirect off;

        location / {
          proxy_pass http://localhost:8080;
        }

        location /cat {
          rewrite ^(/c ...
Score: 0
IceRevenge avatar
nginx windows: website only reachable with localhost, not when using IP-address
es flag

I am running an nginx (v. 1.20.1) proxy on my windows machine. The following is the nginx.conf:

http {
  include       mime.types;
  default_type  application/octet-stream;

  sendfile        on;
  keepalive_timeout  65;

  server {
      listen       *:80;
      server_name  localhost;

    
      location / {
          proxy_pass http://localhost:9000;
      }

      error_page   500 502 503 504  /50x.h ...
Score: 0
dgarg avatar
How to understand and optimize memory used by each Apache process
gb flag

I am aware of the method to get the average memory used by each apache2 process using ps. I have observed it and it is coming out to be around 18MB (Although it seemed to have spiked from last 2 days from 18MB avg to 25MB).

Our server is serving an API which accepts some data and stores it in a mysql db. The api is written in PHP. I have used PHP mem_get_usage and mem_get_peak_usage functions to  ...

Score: 1
diaper avatar
How do online games send UDP packets across the internet?
ca flag

How do online multiplayer games which use UDP get the packets delivered between networks over the internet? From what I understand, clients would have to enable port forwarding on their routers in order for the packets to arrive at their computer. Is this what big online games (WoW, Diablo, etc) require players to do?

For example, I recently created a server that handles udp traffic. It just echo ...

The Stunning Power of Questions

Much of an executive’s workday is spent asking others for information—requesting status updates from a team leader, for example, or questioning a counterpart in a tense negotiation. Yet unlike professionals such as litigators, journalists, and doctors, who are taught how to ask questions as an essential part of their training, few executives think of questioning as a skill that can be honed—or consider how their own answers to questions could make conversations more productive.

That’s a missed opportunity. Questioning is a uniquely powerful tool for unlocking value in organizations: It spurs learning and the exchange of ideas, it fuels innovation and performance improvement, it builds rapport and trust among team members. And it can mitigate business risk by uncovering unforeseen pitfalls and hazards.

For some people, questioning comes easily. Their natural inquisitiveness, emotional intelligence, and ability to read people put the ideal question on the tip of their tongue. But most of us don’t ask enough questions, nor do we pose our inquiries in an optimal way.

The good news is that by asking questions, we naturally improve our emotional intelligence, which in turn makes us better questioners—a virtuous cycle. In this article, we draw on insights from behavioral science research to explore how the way we frame questions and choose to answer our counterparts can influence the outcome of conversations. We offer guidance for choosing the best type, tone, sequence, and framing of questions and for deciding what and how much information to share to reap the most benefit from our interactions, not just for ourselves but for our organizations.