[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

Linux Networking

18K

Solutions

15K

Contributors

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

zgrep 'xyz'  abc.log.2018111212| grep '|[1-9][0-9][0-9][0-9][0-9]|0000' | wc -l

i am trying to figure out what above grep doing?

what is meaning of
|[1-9][0-9][0-9][0-9][0-9]|0000

wc -l means some kind of word count?
what is -l

any good links or resources or video tutorials to master greps and awk and sed end to end to debug server logs?

please advise
0
Build an E-Commerce Site with Angular 5
LVL 12
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

Hi

My redhat (guest OS) having issue for not able to resolve the hostname like google.com but able to ping 8.8.8.8.

I didn't do anything at all just to ensure that it can ping Google first and my network subnet like 192.168.1.0/24 when my redhat added a NAT Network adapter without issue.

After that I connect my fortinet vpn client thr IPSec and still can ping and resolve my private cloud thr hostname.

Next day I do the same thing like connect to my iPad 4G network to my Hp laptop wifi.

Can ping and resolved on my hp laptop even being connected to vpn.

The guest os redhat from virtualbox on nat can ping 8.8.8.8 but not able to resolve now.

Why yesterday can and today can't without changing anything?

Thanks.
0
Hi

My redhat (guest OS) having issue for not able to resolve the hostname like google.com but able to ping 8.8.8.8.

I didn't do anything at all just to ensure that it can ping Google first and my network subnet like 192.168.1.0/24 when my redhat added a NAT Network adapter without issue.

After that I connect my fortinet vpn client thr IPSec and still can ping and resolve my private cloud thr hostname.

Next day I do the same thing like connect to my iPad 4G network to my Hp laptop wifi.

Can ping and resolved on my hp laptop even being connected to vpn.

The guest os redhat from virtualbox on nat can ping 8.8.8.8 but not able to resolve now.

Why yesterday can and today can't without changing anything?

Thanks.
0
Hi,

I need to transfer the python script to the redhat 7.5 on virtualbox.

i've done the following:-

vb_setting1.jpg
Error

vb_setting2.jpg
Thanks
0
how to enable xhost in Linux server

I am  getting the below error
xhost +
xhost:  unable to open display "10.1.1.1:0"

==
please advise
0
What's the best way to monitor for UDP syslog traffic coming in from a redhat 4 and redhat 5 syslog clients if it's not arriving at the syslog server. The syslog server is running on a Redhat 6 server. netstat -taulpe | grep syslog is showing that UDP is listening on all IP's on the server but I'd like to see if there is any other way apart from running  tcpdump -i <nic> port 514. Would watch lsof -a -i:514 show it?
0
Our Solaris 10 server running Weblogic are getting thousands of messages below:
Intermittently the OS would freeze:  no core/crash dumps found.

Does this require a WL or Solaris patch or certain TCP tuning?  


Feb  5 06:17:27 VGUV30 ip: [ID 995438 kern.warning] WARNING: High TCP connect timeout rate! System (port 8080) may be under a SYN flood attack!
Feb  5 12:13:03 VGUV30 ip: [ID 995438 kern.warning] WARNING: High TCP connect timeout rate! System (port 8080) may be under a SYN flood attack!
Feb  6 10:28:25 VGUV30 ip: [ID 995438 kern.warning] WARNING: High TCP connect timeout rate! System (port 8080) may be under a SYN flood attack!
Feb  6 11:56:35 VGUV30 ip: [ID 995438 kern.warning] WARNING: High TCP connect timeout rate! System (port 8080) may be under a SYN flood attack!
Feb  7 21:57:33 VGUV30 ip: [ID 995438 kern.warning] WARNING: High TCP connect timeout rate! System (port 8080) may be under a SYN flood attack!
Feb  7 22:06:34 VGUV30 ip: [ID 995438 kern.warning] WARNING: High TCP connect timeout rate! System (port 8080) may be under a SYN flood attack!
Feb  8 04:24:08 VGUV30 ip: [ID 995438 kern.warning] WARNING: High TCP connect timeout rate! System (port 8080) may be under a SYN flood attack!
Feb  9 21:28:25 VGUV30 ip: [ID 995438 kern.warning] WARNING: High TCP connect timeout rate! System (port 8080) may be under a SYN flood attack!
Feb  9 22:12:10 VGUV30 ip: [ID 995438 kern.warning] WARNING: High TCP connect timeout rate! System (port 8080) may be …
0
how to add a block firewall rule in CentOS 7
using applications >> sundry>> firewall>> rich rules |    I added a destination IP, source is local ip &  & action selected drop. but still i can communicate with destination ip.
firewall profile is public.
0
Dear Experts
We are having web based CRM application running on LAMP stack web server and data base servers are running two different server. Our software developers have decided to create indexes based on their analysis due to slow queries observations, the database server is mysql 5.4 version.
As it is production server the indexing will affect the work and also the tables size is huge and overall database size is 65GB. Please suggest the best practice, following is the approach can think about but again not sure if this is best recommended but there is a challenge as mentioned, please suggest on how such cases are handled.
1.Setup new webserver and mysql server with same config and same versions and take backup of production server database and import it to the new database server and create indexes and test, this process may take few days to week and by the time indexing gets completed which may take few days during this period production server database would have undergone changes as users are working on production instance, can you please suggest the best way to handle this.
0
xhost executing successfully for the user who has the direct login access to the OS.

when I swtich to the other user (su) and which doesn't have the direct login access to OS, could not run the xhost command.

Kindly advice, how to achieve the same.
0
JavaScript Best Practices
LVL 12
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

Previously when we transferred a 20GB gz  Solaris file down to PC's
local HDD & then from the local PC HDD, transfer to a USB HDD, our
DLP corrupted the gz file when it's transferred from local HDD to USB

We have since resolve that but to prevent untoward corruption in
future for copying of critical files to USB HDD,

Q1:
Does Winscp has checksum feature that checks at Unix end & at
PC end?

Q2:
If so I would rather use Winscp to transfer directly to USB HDD.
0
unix server keep sign out after 1 minute or so on production.

is there is a way i can run some process like

tail -f xyz.gz
to keep continuous rolling until i cancel that so that it wont sign out on me while i focus on some other work  for 30 miinutes and come back it should not signout
please advise
0
On a Redhat Linux system running a bash shell script I need some help with an if then statement that has more than 2 conditions. I basically want to check for this
A AND B or C  
A AND B or D
A AND B or E

Something along these lines but it doesn't work and wondered if I have the correct usage of brackets. It's not what's contained for evaluation that's the issue it's the syntax of the AND and OR where there's more than two conditions that I am struggling with.

if [[ $(find /opt/app -name httptd*.conf | grep -v grep | grep -c http) -eq 0 ] && [ ! -f /etc/init.d/apache ] ||  [ $(find /app -name http*.conf | grep -v grep | grep -c http) -eq 0 ]] || \
[[ $(find /opt/app -name httptd*.conf | grep -v grep | grep -c http) -eq 0 ] && [ ! -f /etc/init.d/apache ] ||  [ $(find /application -name http*.conf | grep -v grep | grep -c http) -eq 0 ]] || \
[[ $(find /opt/app -name httptd*.conf | grep -v grep | grep -c http) -eq 0 ] && [ ! -f /etc/init.d/apache ] ||  [ $(find /application -name manifest* | grep -v grep | grep -c http) -eq 0 ]] ; then
.....
0
Dear Experts

We are running web server (10.253.18.41) which is on lamp stack and database server mysql is on another server 10.253.12.42, users are complaining the application is taking too long time also on prospect conversion takes too much time and finally timeout approx 3 mins then time out , when check the network statics below is the continuous report, please let me know what does this indicate, what could be the solution

tcp        0      0 10.253.18.41:38760          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38765          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38274          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38130          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38590          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38116          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:39296          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38577          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38379          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:39027          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38827          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38222          10.253.12.42:3306           TIME_WAIT
tcp        0     …
0
Hello,
can I have multiple profile on OpenVPN server ? with deferent configuration ?
for example one with cert auth and second with user name password auth ?
any example about that ?
thanks.
0
Dear Experts

CRM system work flow triggers emails to the prospect email account as and when the prospect statues changes via the SMTP server ( without password that is without authentication as it is Relay server hosted locally-office 365 mail protection ). We could see the connection to the email server getting established but no packets sent/received , but through telnet we can send and receive mails by making use of from and to email commands through the telnet session, can you help where the things are going wrong. following SL2 cases it works but SL3 it does not work.
1. though telnet to the smtp server with FROM and TO commands it works that is mail is delivered to the TO addressed account.
2. though CRM system configure email settings with email account, smtp and port without the SMTP authentication mail is getting delivered to the To account.
3. CRM system through workflow trigger email on each status changes mail is not getting delivered instead we can see connection is ESTABLISHED to the smtp server
0
For this question, let's forget about v-nodes/vnodes. So let's say the contents of a file are located in data block(s) on a real physical disc.

See for example: https://www.usna.edu/Users/cs/aviv/classes/ic221/s16/lec/21/lec.html#orgheadline4

2.3 V-node and I-node Tables

There they explain the inode-table. Actually the inode-table just leads you to the contents of a file. But I think they forgot to mention something important. Let's say I'm requesting a regular file in a filesystem. In such a case, for what I need the inode-table? I just see it like this:

dentry (possibly more than 1) -> inode -> data block(s)

The inode contains the pointers to the data block(s). So why we need an inode-table? Or is this inode from above actually just an entry in the inode-table? If that's true, then it's weird because the inode-table is stored in memory, so when restarting the computer all the inodes are gone. Furthermore, probably the inode-table only contains information about open files.

Or are the inodes of open files just cached in memory (in the inode-table) to speed things up? Then the purpose of the inode-table is i.a. caching?

Anyway I'm surprised that they don't say anything about this. I think understanding the inode-table starts with the question why there is an inode-table.
0
Dear Experts

In windows server where the application server (CRM system)  is deployed this application which connects to multiple integrations like website , CTI, also configured office 365 smtp, the application logs are not giving us enough data hence from the windows server level how to find or get the log report , when the CRM application runs logic based on scheduler it triggers emails to the customers to check this from windows server level what to do please suggest, in linux think we can use netstat - tulnp, In windows server how to find the application which is running is it establishing connection to the remote services like smtp configured. for example
1.  would like to run the command where it lists  only the running smtp connections established
2. would like to run the command where it lists all the connections established to web server.
also is it possible to append to text file
0
Dear Wizards, I setup the ubuntu 16.04 server in vSphere 6.5 with 250 GB hard disk, but days later I increased it to 500 GB, but seems like the VM still had only 250 GB.

How can I claim it back correctly? Many thanks!

ired1.PNG
ired2.PNG
0
Become a Certified Penetration Testing Engineer
LVL 12
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

After 30+ hours of research and trying different solutions I have found many solutions to each piece of this puzzle but can't quite get them to work together or figure out the best approach so I'm hoping you guys can help.

The goal: Use public IP from a remote server(Ubuntu) as a browser proxy. The kicker is that the server should pass all traffic through to a local machine which has a 4g modem internet connection to use its internet connection. We need to be able to assign fixed IP addresses/IP port combinations to these local modem/s to be used as undetectable browser proxies to make it appear that the browser client is logged in using the mobile internet connection.

I have seen multiple solutions to each part of this including the use of ssh tunnels, dynamic port forwarding/socks, remote port forwarding, squid proxy server/other proxy server software, iptables configs etc..

I have found this solution that I can get traffic to travel from anywhere to my local machine:

//1st terminal establishes connection/tunnel ssh -nN -R 8888:localhost:8889 -i "connection.pem" ubuntu@e-xx-xx-xx-xx.remote-server.com

//2nd terminal listens on port 8889 netcat -l -p 8889 //this command works and prints abc on the local machine echo "abc" | nc -v xx.xx.xx.xx(remote server ip) 8888

I have also successfully installed a squid proxy server in a docker container and used the following command to open socks connection with reverse forwarded port.

//Socks/Dynamic forwarding with…
0
Does anyone know How can I see the interface up and down logs in the ubuntu 18.4? there should be something like /var/log/dmesg shows logs
0
how to grep multiple awks

$ awk '{print;}' employee.txt
100  Thomas  Manager    Sales       $5,000
200  Jason   Developer  Technology  $5,500
300  Sanjay  Sysadmin   Technology  $7,000
400  Nisha   Manager    Marketing   $9,500
500  Randy   DBA        Technology  $6,000


$ awk '{print $2,$5;}' employee.txt
Thomas $5,000
Jason $5,500
Sanjay $7,000
Nisha $9,500
Randy $6,000

in above query how to tweak to see  see all records whose name starts with 'S' and Salary greater than '6000'

also
in above query how to tweak to see  see all records whose name starts with 'S' and Salary greater than '6000' and Department Starts with  'T'


100  Thomas  Manager    Sales       $5,000     08/08/1988 6:00:01AM
200  Jason   Developer  Technology  $5,500 08/08/1989 7:00:02AM
300  Sanjay  Sysadmin   Technology  $7,000 08/08/1982 9:00:03AM
400  Nisha   Manager    Marketing   $9,500 08/08/1981 10:00:04AM
500  Randy   DBA        Technology  $6,000 08/08/1981 11:00:5AM
if it has joined date and time as above
in above query how to tweak to see  see all records whose name starts with 'S' and Salary greater than '6000' and Department Starts with  'T' and joined between particular date time to particular date time say  08/08/1982 9:00:03 AM till 08/08/1981 10:00:04AM
i need to use above in a zgrep command

https://www.thegeekstuff.com/2010/01/awk-introduction-tutorial-7-awk-print-examples/
0
Dear Experts

We are having web-based application on linux which uses LAMP  which is production server recently the web-based application stops working for some time later it resumes back and when checked the /var/log/messages can find the following
kernel: Out of memory: Kill process 249606 (httpd) score 32 or sacrifice child
Sep 13 13:19:27 NYSWB kernel: Killed process 249606, UID 48, (httpd) total-vm:2826972kB, anon-rss:1334424kB, file-rss:2044kB
attached /cat/proc/meminfo and also fdisk -l , the system has 32G of physical RAM,
please suggest should i have to create one more swap partition OR should I have to edit swap config if yes please help me with steps, or any other steps on any config to be done please let me know, thank you.
memandfdisk.txt
0
Dear Experts

I am running crm system web-based which is LAMP stack the web root is /var/ww/html/crmapp and the CRM system reads the files from windows share that is from 2 windows server and executes the logic as per the process developed but I am getting following error from /var/log/messages , attached /etc/fstab, df -h and nswitch.conf, can you please help me in first windows share mount to the same path of web root is it recommend and also is the fstab entires are correct please suggest as the system is very slow.

automount[2560]: syntax error in map near [ * -fstype=autofs,-Dhost=& file: ]
Sep 11 20:06:15 NYSWB automount[2560]: syntax error in map near [ * -fstype=autofs,-Dhost=& file: ]
Sep 11 20:06:17 NYSWB automount[2560]: syntax error in map near [ * -fstype=autofs,-Dhost=& file: ]
Sep 11 20:06:19 NYSWB automount[2560]: syntax error in map near [ * -fstype=autofs,-Dhost=& file: ]
Sep 11 20:06:21 NYSWB automount[2560]: syntax error in map near [ * -fstype=autofs,-Dhost=& file: ]
Sep 11 20:06:23 NYSWB automount[2560]: problem reading master map, maximum wait exceeded
Sep 11 20:06:23 NYSWB automount[2560]: automount: warning: could not read at least one map source after waiting, continuing ...
Sep 11 20:06:23 NYSWB automount[2560]: syntax error in map near [ * -fstype=autofs,-Dhost=& file: ]
fstabanddf.txt
0
Dear Experts

application server web-based of LAMP stack becomes extremely slow and makes application unable to use, web-server(application file system) is having 16GB Ram and database server is separate with 64GB ram and did run mysql tuner attached for your reference below posted recommendation section, when try to set values as recommended mysql fails to start  withe following error log, please help on what values to set so that below error is fixed, thank youmysqltuner12.txt
Plugin 'InnoDB' init function returned error.
180911 14:18:19 Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
180911 14:18:19 Unknown/unsupported storage engine: InnoDB
180911 14:18:19 Aborting

Below -extract of recommendations section from the attached

-- Recommendations ---------------------------------------------------------------------------
General recommendations:
    Control warning line(s) into /var/log/mysqld.log file
    Control error line(s) into /var/log/mysqld.log file
    Set up a Password for user with the following SQL statement ( SET PASSWORD FOR 'user'@'SpecificDNSorIp' = PASSWORD('secure_password'); )
    Restrict Host for user@% to user@SpecificDNSorIp
    MySQL was started within the last 24 hours - recommendations may be inaccurate
    Reduce your overall MySQL memory footprint for system stability
    Dedicate this server to your database for highest performance.
    Adjust your join queries to always utilize …
0

Linux Networking

18K

Solutions

15K

Contributors

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.