Archive for the 'Linux Support' Category

Find if initscripts or sysconfig has support for bonding

If you’re unsure whether your distro uses sysconfig or initscripts, or don’t know if it’s new enough, have no fear.

$ rpm -qf /sbin/ifup

It will respond with a line of text starting with either “initscripts” or “sysconfig,” followed by some numbers. This is the package that provides your network initialization scripts.

Next, to determine if your installation supports bonding, issue the command:

$ grep ifenslave /sbin/ifup

If this returns any matches, then your initscripts or sysconfig has support for bonding.

SBDavid

Suhosin Simulation

suhosin.simulation

Suhosin‘s features are all configured through the php.ini configuration file. For most users the Suhosin will work out of the box without any change to the default configuration needed.

If you fear that Suhosin breaks your application, you can activate Suhosin’s simulation mode with this flag. When Suhosin runs in simulation mode, violations are logged as usual, but nothing is blocked or removed from the request.

Type: Boolean
Default: Off

When you only use the Suhosin-Patch only the logging features are supported. When you only use the Suhosin-Extension you cannot use the predefined constants for configuration. This is due to the way php.ini constant support is implemented in PHP.

Tcpdump to monitor SMTP activity from a IP or range of IP

The tcpdump is a useful utility to monitor the network activity in the server.

tcpdump -i eth0 -n src 192.168.1.22 \or dst 192.168.1.22 -w smtp.tcpdump -s 2048

You can monitor the SMTP activity to find out the mail account used by spammer.
The above command will monitor the SMTP activity from the IP address 192.168.1.4 and will log to the file smtp.tcpdump.

Use the following command to monitor a range of IP

tcpdump -i eth0 -n src net 119.91.0.0/16 \or dst net 119.91.0.0/16 -w smtp.tcpdump -s 2048

The above command will monitor the range of IP starting with 119.91. You can use Wireshark to analyze the dump file.

For VPS you need to use venet0:0

tcpdump [ -AdDeflLnNOpqRStuUvxX ] [ -c count ]
[ -C file_size ] [ -F file ]
[ -i interface ] [ -m module ] [ -M secret ]
[ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]
[ -W filecount ]
[ -E spi@ipaddr algo:secret,... ]
[ -y datalinktype ] [ -Z user ]
SBDavid

Howto disable ipv6 networking

Howto disable ipv6 networking

First check if the module is loaded:

To check if this module is currently loaded in your system, issue the following command as root. If you see ipv6 in its output, then the module is loaded.

lsmod | grep ipv6

Disable ipv6 in ubuntu:

You need to edit the aliases file using the following command:

sudo nano /etc/modprobe.d/aliases

Find

alias net-pf-10 ipv6

change to

alias net-pf-10 off
alias ipv6 off

Save the file and reboot.

Disable ipv6 in Fedora/Centos:

Open your modprob.conf file and add following line:

vi /etc/modprobe.conf

Add

alias net-pf-10 off

Or disable it with the following command.

chkconfig ip6tables off
SBDavid

How to deploy a .WAR application

How to deploy a .WAR application

Upload the .WAR archive to /public_html/servlet
Extract .WAR archive using Shell access using the unzip command (See How to access SSH if you need help)

Example:

# unzip example.war
Archive: example.war
creating: META-INF/
inflating: META-INF/MANIFEST.MF
inflating: helloworld.jsp
creating: WEB-INF/
inflating: WEB-INF/web.xml
inflating: index.html

The system scans the appBase for WAR files at 5 minute intervals.
There is a specific structure that Java web archives must have and it will not work if it does not.

« Prev - Next »