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

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 CompTIA Certified Healthcare IT Tech
LVL 12
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

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
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
We are having CRM application which is web-based runs on LAMP stack. the operation team reports between specific time period user get time out when they save the records or convert the records or retrieve the records, can you please suggest on how to capture log files which occurs during that time for example 5pm to 6pm, only during this time I would like to capture a following log files.
1) /var/log/mysql.log
2)/var/www/html/crmapp/crm.log
3) /var/log/slowquerylog
4)/var/log/httpd/error.log
please help with steps on above 1 to 4 log capture during specific time period , this will be helpful to investigate , thank you very much.
0
I am sysadmin..I want to know

I want to reach the server, to check the connectivity thru specific port.
This is just to varify whether the required firewall rule defined properly or not.
0
Consider the below scenario

userPC---- firewall --- Destination-server
                         10.1.1.1


I have installed some software on the server, the service  of that software is using port # 301.

1) Scenario...
      Firewall defined
      server#  service UP
        userPC# telnet 10.1.1.1 301  --> user get reply

2)Scenario...
      Firewall defined
      server# service DOWN

is there any command/3rdparty-tools available to just varify, pockets from userPC able to reach on the server through port#301

==
This I asked just to segregate if there any issue, problem from firewall side (or) destination server side.
0
awk query
 unzip -c  xyz.log.20180905.gz| awk '$0>= "2013-Sep-09 18:33" && $0 <="2013-Sep-09 23:15"'| grep '|[1-9][0-9][0-9][0-9][0-9]|0000'|wc -l
Zip file too big (greater than 4294959102 bytes)
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
how to learn awk any good video tutorials on it?
please advise
0
Dear Experts

in linux server of centos,  we are running crm which is web based application apache, mysql and php once in few hours users are getting timeout and this is affecting very badly,
1. would like to fetch the log reports of server resources consumption like  RAM, CPU to understand the issue is occurring due to over load of that particular time.
2.  would like to fetch apache logs and mysql logs of that particular time
to determine the time that users are facing issues of application time out , Can I ask software developer to provide me time out occurred and application closed  date and time and during that time check the server resource utilisation which will help me to trace the issue is it due to server or application level.
please help on best practice on such cases.
0
Exploring SQL Server 2016: Fundamentals
LVL 12
Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

zgrep 'XYZ|AB|MASTER' AAAA.log.20180904.gz | grep '|[1-9][0-9][0-9][0-9][0-9]|0000' | wc -l

can you please advise what is the meaning of above zgrep command

where i can find, practice and learn above kind of commands

how grep and egrep are different

https://ryanstutorials.net/linuxtutorial/grep.php
how to learn regular expressions used in queries

Please advise
0
I have a samba domain controller. all my ubuntu server is on domain. i created a group in ad.
But this group is unknown for all my ubuntu servers.
users can login to server via domain password. and all server answer back for wbinfo -g.
how to active domain groups in ubuntu servers?
0
Hi,

I'm running CentOS Linux release 7.4.1708 (Core), issue is i'm able to login using local users but not using ldap users, please help me on this.

I've tried restarting services using authconfig-tui command, but still i'm getting authentication failure error for ldap user.

please see the attached doc (ldap issue.docx), and below output commands and let me know if any other details are required.


[root@server01 log]# cat /etc/openldap/ldap.conf
#
SASL_NOCANON    on
URI ldap://<ldap servrer ip>:389/
BASE dc=prod,dc=hclpnp,dc=com
#
[root@server01 log]# getent passwd testuser
testuser:*:123456:7001:testuser:/home/testuser:/bin/bash
[root@server01 log]#


[hubba@servder01 ~]$ su - testuser
Password:
su: Authentication failure



[root@server01 log]# cat /etc/nsswitch.conf
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Valid entries include:
#
#       nisplus                 Use NIS+ (NIS version 3)
#       nis                     Use NIS (NIS version 2), also called YP
#       dns                     Use DNS (Domain Name Service)
#       files              …
0
Hi guys, I'm currently doing send mail to fax by using hylafax. I'm using thunderbird to send mail to my fax machine. The mail address looks like this 123456@mail.hylafax.com. So my current problem is when i send the mail to the fax machine, what i received at the machine was all the log text, my sent content was not there, it print out the log message in /temp/mail2faxlog
i will attach my postfix main.cf, master.cf,  mail2fax.sh  and my valias file in here.

My transport file looks like this:
mail.hylafax.com fax:localhost

My valias
@mail.hylafax.com mail2fax

I'm currently following these guide:
http://hylafax.sourceforge.net/howto/faxing.php 
http://www.postfix.org/faq.html#fax
mail2fax.sh
master.cf
main.cf
0
file create error on below site


https://www.tutorialspoint.com/execute_bash_online.php

please advise how to create some files and practice grep commands there

any other online free tools to practice unix.

please advise
fileCreate.png
0
I have a Proxmox Server.
It has a static ip, setup withbridge  vmbr0.
I can access the internet from it.
However, I cannot do the same

This is my interfaces:
interfaces
This is my ifconfig:
ifconfig
In my vm instance of CentOS, I changed my static ip with command:
vi /etc/sysconfig/network-scripts/ifcfg-ens18 to include:

IPADDR="192.168.100.105"
NETMASK="255.255.255.0"
BROADCAST="192.168.100.255"


I ran command vi /etc/sysconfig/network to include: GATEWAY="192.168.100.1" .

I restarted with command: systemctl restart network.service .

I can reach my gateway from the CentOS VM but still can't reach internet.

Still new to this, anyone know what I'm missing?
0
I tried setting up tftp on a lnux server using proc here http://wiki.r1soft.com/display/ServerBackup/Configure+a+TFTP+server+on+Linux

But when I run tftp  -c get ls  - I get..

$ tftp  -c get ls
(to)

The article states "If the TFTP server works, the command will not return any output and the file ls should appear in the current directory."

Not working as expected. Anything need to be done? Permission changes to /tftpboot? Anything else I can do to verify that tftp portion of xinetd is
working as expected?



Linux myfoo 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
0
what is the meaning of below command

zgrep 'CUSTOMERPASS' abcd.20180719.gz|grep -v 'Trials: 1'|less



Is there is single link, tutorial or video tutorial where i can find above kind of command
and
count command

more
less
grep
etc.

alll commonly used commands like above
why we need | before less?

Please advise
0
server times out

i have 15 production unix server instances to check logs same time

when i am on one monitor other monitor times out in every 15 minutes

if i type
tail -f logfile


does it still times out on me

i cannot change time out setting myself

just looking for some work around so that i do not have to enter username and password all over again
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.

transactions search in unix logs


in the unix logs of transactions each transaction has bunch of values like

transaction_id|transaction_time|transaction_description|transaction_type| ......etc



if i want to display only the transactions that took more than say 30 minutes and whose transaction_type is "sell"

how do i frame my grep command for that

any sample queries, links, resources, sample video tutorials on this

Please advise
0
I have recently installed an Ubuntu 16.04 VHD image. Initially the /etc/network/interface file was empty. I put in the ip address info that I was provided by our network guy.
ifconfig showed eth0 as the interface name.
I edited the interface file to have the following:
auto eth0
iface eth0 inet static
address 10.100.1.6
gateway 10.100.0.1
submask 255.255.248.0
dns-nameservers .....

the network folks changed their minds and wanted to put my server on a different subnet.
I have edited the interface file.
auto eth0
iface eth0 inet static
address 10.99.0.6
gateway 10.99.0.1
submask 255.255.240.0
I have flushed the interface.
I have tried rebooting and actually shutting down the system.

but each time when I boot back up the interface continues to be configured with the old IP.

what am I doing wrong?
What do I need to do in order for the new IP to be loaded into the configuration?

Thanks in advance.
0
when i open with winscp that opens old stale file compared to putty opening of same file say xyz.ccfg

i wonder why winscp does not show recent changs?

please advise
0
tail -f logfile.log


what is the meaning of above command.

i see logs rolling too fast.

is there is a way i can slow it down to see clearly slowly

any god tips, links, resources on how to debug production logs efficiently just using putty without any fancy costly tools?

please advise
0
My goal is to be able to connect to private network located behind OpenVPN client (192.168.1.0/24) via OpenVPN server WAN interface.
For example I want this forwarding: http://{Ubuntu WAN IP}:443 -->  http://{Private LAN IP behind OpenVPN client }:443
Please take a look at the attached screenshot.
-  Ubuntu VPS knows the route to private LAN subnet that is behind OpenVPN client (192.168.1.0/24) and MikroTik router knows the route to OpenVPN subnet (192.168.7.0/24).
- I can connect to Ubuntu VPS via SSH and successfully ping MicroTik OpenVPN interface (192.168.7.2) and also I can ping any host from MicroTik private LAN subnet that is behind OpenVPN client (192.168.1.0/24) , needless to say the private LAN hosts that are behind OpenVPN client (from 192.168.1.0/24 subnet) can easily ping Ubuntu OpenVPN interface (192.168.7.1) too.
- Also any host from OpenVPN subnet (192.168.7.0/24) if connected to OpenVPN server via OpenVPN client allows communication like http://{Ubuntu WAN IP}:443 --> http://{Private IP of OpenVPN client}:443 using UFW NAT rule.
But:
When I’m trying http://{Ubuntu WAN IP}:443 --> http://{Private LAN IP behind OpenVPN client}:443 I have following behavior:
1)      Packets successfully arrive to host behind OpenVPN client (to any host from 192.168.1.0/24 )
2)      But the host of this subnet can't route back this received public IP packet via OpenVPN tunnel, it replies using ISP WAN address.

I would very happy if someone is able to help me solve this …
0
Hello Community,

I need some help installing Opennms monitoring software because Im getting error trying to install it on Oracle Linux 6.9.

I used this commands:

wget https://yum.postgresql.org/9.3/redhat/rhel-6.9-x86_64/pgdg-oraclelinux93-9.3-3.noarch.rpm

Open in new window

yum install postgresql93-server postgresql93-contrib uuid-pgsql.x86_64 repmgr93.x86_64 rhdb-utils.x86_64 skytools-93-modules.x86_64 pgbackrest.x86_64 pgdg-oraclelinux93.noarch pgloader.x86_64 pgmemcache-93.x86_64 pgmp93.x86_64 phpPgAdmin.noarch pgagent_93.x86_64 ora2pg.noarch -y 

Open in new window


Then, with sudo rights did:

sudo bash bootstrap-yum.sh

And getting the error below:

PostgreSQL initialize                 ... FAILED

Open in new window


Im using the installer provided by official site.

Regards,
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.

Top Experts In
Linux Networking
<
Monthly
>