Linux Networking





The variety of Linux distributions creates myriad issues relating to configuration and operations when computers are networked, not the least of which is the use of various network management applications, some of which are included with specific distributions, while others are standalone applications.

Share tech news, updates, or what's on your mind.

Sign up to Post

winscp how to name the link i save to favorite

say i have link

i want to save above link with name as production_logs_folder

I have other link as below


i want to save above link with name as crm_logs_folder

how do i name like above so that it is easy to locate and navigate later
\please advise
Get your problem seen by more experts
LVL 12
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

log file how to copy whole content

zgrep -C20 '1234' 1234.log.gz

above gave lot of results in unix screen

how to copy whole page and paste into a text file on my C drive of the windows laptop through which i am connecting to unix box using putty?


i see all results like



which i do not want

i want complete word search of 1234 only
how to achieve it
please advise
what is curl and ping in unix.

lets say i have service called

now if do
get the exact_name of service from above result
then use that exact name to ping
ping exact_name
then we can get ip of the service where it is running?

please advise
Hello Experts,

I'm having some problems with firewall rules and would like the help of you guys.

I added a VPN connection (StrongSwan), but I can not access the network from the other end.

when I run the firewall script (iptables), the script flushes the rules (filter and nat) and adds the new rules. While the script rules are not added (policy: accept) I can access the other end of the VPN, but when the nat table rules are added, I lose the communication.

Yes, I know there must be an error in the nat rules, but I can not figure out exactly which rule(s) is(are) causing that impact.

I tried to use iptables TRACE, but I have a lot of rules applied and I can not understand the results and I can not locate exactly what the problem is.

And now the weirdest part (I think): I have another VPN connection (another network destination) configured on the same machine, with exactly the same rules and do not have this problem.

Can any of the experts give me an idea of how I can try do the troubleshooting or know how I can try to solve this problem? I'm lost!

Thanks in advance!

Best Regards
I can see all processes in my box using memory total as 25GB but the actual memory used is 62GB, I am really confused that what happened for remaining memory....don't know whether i need to clear memory cache or not?

test@test[~] $  ps aux  | awk '{print $6/1024/1024 " GB\t\t" $11}'  | sort -nr | awk '{print $1}' | awk '{total = total + $1}END{print total " GB"}'
24.4622 GB
test@test[~] $ free -g
                            total       used       free     shared    buffers     cached
Mem:                      62         62          0          0               2             32
-/+ buffers/cache:              27         35
Swap:                        7          0          7
test@test[~] $

Open in new window

memory issue
I'm having issues installing auditd on Ubuntu 16.04.  Below is what I get.. Any ideas?

After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up auditd (1:2.4.5-1ubuntu2.1) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Job for auditd.service failed because the control process exited with error code. See "systemctl status auditd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript auditd, action "start" failed.
● auditd.service - Security Auditing Service
   Loaded: loaded (/lib/systemd/system/auditd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2018-03-07 16:24:26 UTC; 5ms ago
  Process: 3196 ExecStartPost=/sbin/auditctl -R /etc/audit/audit.rules (code=exited, status=0/SUCCESS)
  Process: 3195 ExecStart=/sbin/auditd -n (code=exited, status=1/FAILURE)
 Main PID: 3195 (code=exited, status=1/FAILURE)

Mar 07 16:24:26 support systemd[1]: Starting Security Auditing Service...
Mar 07 16:24:26 support systemd[1]: auditd.service: Main process exited, code=exited, status=1/FAILURE
Mar 07 16:24:26 support systemd[1]: Failed to start Security Auditing Service.
Mar 07 16:24:26 support systemd[1]: auditd.service: Unit entered failed state.
Mar 07 16:24:26 support systemd[1]: auditd.service: Failed with result 'exit-code'.
dpkg: error processing package auditd (--configure):
 subprocess installed …
What awstat format i need for that type af log from ftp server
Feb 26 13:47:24 ftp sshd[1260]: Disconnected from port 36575 [preauth]
Feb 26 13:47:24 ftp sshd[1260]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=  user=root

i used all 1 ...4 then i used :
LogFormat= "%time3 %other %method %url %logname %host %code %other"
LogFormat= "%time3 %other %host %bytesd %url %other %other %method %other %logname %other %code %other %other"

all says  
found 401 dropped records
2000 corrupted records
i have nagios core version 4.3  installeret på server ubuntu 16.04 . and nrpe version 3 og plugin 2.2.1 from client. on ununtu 16 and 14.
alle works . except for one ubuntu 16.04 i have error connection reset by peer )from nagios server)
from client when i say
./check_nrpe -H ipadress        then connection reset by peer
./check_nrpe -H       working  NRPE 3.2.1
./check_nrpe -H localhost    connect to address ::1 port 5666: Connection refused
NRPE v3.2.1

i have disabled = no on /etc/xie../nrpe
and  only_from       = client-ip  server-ip

from /usr/local/.../nrpe.cfg
allowed_host =,::1,client-ip,server-ip

like all other 16.04 and 14.04.
what is wrong?
Erro with unix query

grep -C20 'contactNumber before is------>'  *

above grep command gives below error message
grep: diagnostic_images: Is a directory
grep: jmsservers: Is a directory

what it means?

please advise
how to check production logs

i logged to production server i went to server log path.
i did
ls -ltr

i see bunch of log files at different timestamps

lets say xyz.log is at 1:30 am which i am interested to see.

how to open and hjow to see it?

when i logged using winscp says log in denied to copy over to windows laptoip to check.
like i want to zgprep or grep all "NullPointerErrors" between 12:30 AM till 2:30AM how do i check?
Also how to check how many times it was restarted?
any good best practices on production logs?
please advise any god links, resources on it?
Free Tool: Port Scanner
LVL 12
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

In Linux redhat 6.5  How to install & configure FC multipathing  

So SAN Storage Driver show as One Driver not as multi Driver's

Multi Driver's
# multipath -ll
Mar 04 12:18:56 | /etc/multipath.conf line 68, invalid keyword: path_checker
mpathc (360002ac000000000000000030001f390) dm-2 3PARdata,VV
size=10G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
  |- 1:0:0:0 sdb 8:16 active ready running
  |- 2:0:0:0 sdd 8:48 active ready running
  |- 1:0:1:0 sdc 8:32 active ready running
  `- 2:0:1:0 sde 8:64 active ready running
grepping a xyz.tar.gz file?

how to grep a xyz.tar.gz file on unix box?

i moved it to loical using winscp.

how to extract it to see file contents

i used qizip and 7 zip they simply changing zip to tar and then tar to zip again and again

please advise
Hello Experts,

I am working on a Proxmox two server cluster.

I am going to put two server as one cluster to have hardware redundancy. I have read that it is recommended to use 3 servers. We only have two for now.

What technical notes or recommendations will I need to get this project started.
i have install postfix on ubuntu 16.04 for send-only mail.
when i send mail nothing happend nor error and  don't send mail.
service status on postfix  is
fatal: bad numerical configuration: mailbox_size_limit = 20M
fatal: bad numerical configuration: mailbox_size_limit = 20M
warning: process /usr/lib/postfix/sbin/local pid 12388 exit status 1
warning: /usr/lib/postfix/sbin/local: bad command startup -- throttling

what is wrong here what should linit be?
Hi to all of you,
I'm preparing new files Audit rules in the /etc/audit/audit.rules file.
The syntax I'm using is: auditctl -w path_to_file -p permissions -k key_name
example -w /etc/libaudit.conf -p wa -k wlib.conf

My question is: if I use the following syntax without specifing the permission option (-p)
auditctl -w path_to_file -k key_name what is the default permission value used?

Sounds a strange question but this is what I've been asked.
Bye  and thanks
I have a Ubiquity EdgeMax firewall in front of my home network. It is currently configured with an L2TP/IpSec VPN server that I can access from outside. I would however like to move to a configuration where I have an IPSec site-to-site tunnel to a linux server in the cloud. My firewall supports that and I can put OpenSwan on the linux instance and connect site-to-site to that. I would like to use the linux endpoint as an internet gateway for my home network. What I can't figure out is how to set up the routing on the linux side so that all traffic to/from my home firewall travels first through the linux instance and then to the internet. Do I need 2 virtual NICs on the linux instance to do that?

If anyone can point me to a detailed OpenSwan config description that would support this I would be grateful.
Does not clear command clears whole screen.

what i noticed is it still kept lot of stuff at the top like previous files, commands i gave etc.

Please advise how to clear everything on clear and do fresh
grep xyz *
afterwards to see only above grep results?
grep -C20 123x789 *
what is difference between above and below command
 grep 123x789 *

what -C20 means here. prints 20 additional bottom lies wherever it find 123x789?

please advise

if i have to print both bottom and top 30 lines what command i have to give?
? for domain controller.
All serveres is virtual server from som center. i want to create a domain controller for vm server and office. domain controller from vm server.
there is a firewall in center and other one is in office.
is there any description or guide for how to do this.all server are ubuntu server.
i can create domain controller with samba on ubuntu.
Free Tool: SSL Checker
LVL 12
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

There is a security system scanner that needs to access a server to scan.  If it states the below, what would be the command to allow?  I've check sshd_config and thought allowed IPs would be in that config.  But it seems I need a command and the system previous setup owner is gone at my current new job.  

RHEL 7.4 Maipo

If you are running IP filters or IP wrappers you will need to permit the systems to access your system via Secure Shell (SSH) on port 22. The IP addresses for the systems are

These are just placeholder IP addresses.  
What would be the command line only to add this?
$ zgrep --version
grep through gzip files
usage: zgrep [grep_options] pattern [files]

when i typed above command i do not see any version number? please advise
$ ls chap1
ex1    ex2    ex3

$ ls chap2

$ mv -u chap1/* chap2/

$ ls chap1

$ ls chap2
ex1    ex2    ex3

not able to do above operations while trying at

please advise.
do chap2 supposed to be under chap1 or outside?
We recently performed a yum update on the RHEL7 box, and much to our dismay, the ability to open the port now fails.

There are two scripts we have to run in order to open the port:
This one runs:
sudo iptables -A INPUT -p tcp --dport 1234 -j ACCEPT

This one fails:
sudo iptables -A IN_public_allow -p tcp -m tcp --dport 1234 -m conntrack --ctstate NEW -j ACCEPT

Gives the following error:
iptables: No chain/target/match by that name.

This always worked for years, now that latest update won't allow this to run

Any help would be greatly appreciated.

I have a ubuntu server on wan. i can connect to it via ssh from windows on another ip rang.
my clint not ping it and i can't ping my client from server.
how to use X app from server i install xinit and x app on server .
firewall is disabled on ubuntu server.
how to do vi mode copy paste
what is mt what it means by tick which key i have to press for tick
y tick t

what is keeping in buffer

d tick t

what is d tick t

seems cygwyn not suporting vi.

how to practice vi on any free downloaded software or online.

what is p for paste and u undo commands?

what is map [ j 0.
 map [ j $.
please advise

Linux Networking





The variety of Linux distributions creates myriad issues relating to configuration and operations when computers are networked, not the least of which is the use of various network management applications, some of which are included with specific distributions, while others are standalone applications.