Archive for the 'centos' Category

FAQ: static routes after restart/reboot in Fedora/RedHat/CentOS

Welcome to Linux Screw! If you're new here, you may want to subscribe our RSS feed.

route 66Static routing is the term used to refer to the manual method used to set up routing. An administrator enters routes into the router using configuration commands. This method has the advantage of being predictable, and simple to set up. It is easy to manage in small networks but does not scale well.

Question: How can I save static routes I set up in my Fedora/RedHat/CentOS Linux after I reboot server?

Answer: In Fedora Linux (or RedHat, CentOS) you can set up static routes for certain network interface (for example eth1) by editing file /etc/sysconfig/network-scripts/route-eth1.

For example, you have to save static route added by the following command:

route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.100.1 dev eth1

To do it, just add the following line to /etc/sysconfig/network-scripts/route-eth1:

ADDRESS0=192.168.0.0
NETMASK0=255.255.255.0
GATE
WAY0=192.168.100.1

Share This

Update Dell laptop BIOS with Ubuntu

dell logoGood news for Dell laptops owners: latest BIOS images can be loaded with Ubuntu, Fedora or CentOS! It was announced at official Direct2Dell blog by Matt Domsch. In a nutshell to get new BIOS installed while you're running Ubuntu 7.04 Feisty, 7.10 Gutsy, or Hardy just enable Universe repository in sources.list (System -> Administration -> Software Sources) and run under root (sudo -s):

wget -q -O - http://linux.dell.com/repo/firmware/bootstrap.cgi | bash
aptitude install firmware-addon-dell
aptitude install $(bootstrap_firmware -a)
update_firmware

The first command enables Dell’s Ubuntu repository as well as downloads and installs GPG key for this repository. As you might guess, restart is needed after last command is done (keep fingers crossed) :)

Please note that detailed instructions on how to update BIOS with Ubuntu (or other Linux distro) and firmware-tools developed by Dell are here:

We are releasing this project in the hopes of moving the industry towards a more scalable and friendly way to update BIOS and Firmware for systems.

Respect to Dell and it’s Linux engineers!

Share This

Long-awaited Pidgin 2.3.0 is out!

pidgin logo One of the best instant messengers named Pidgin (previously Gaim) released it’s latest version 2.3.0. According to developers' description Pidgin is a multiprotocol IM client and it’s goal is to hide protocols from the user as much as possible (users have to know about individual protocols when they create or modify accounts, but in day-to-day communication and usage, the intent is that users don't have to think about protocols at all).

Pidgin supports the following protocols:

Read full developer’s changelog here and download Pidgin from pidgin.im/download. It’s available as source tarball, as binary packages for Fedora, CentOS/RHEL and other major Linux distributions, plus 2.3.0 version is ready also for Windows users.

Share This

Network Traffic Generator: hping

hpinghping3 is a network tool able to send custom TCP/IP packets and to display target replies like ping program does with ICMP replies. hping3 handles fragmentation, arbitrary packets body and size and can be used in order to transfer files encapsulated under supported protocols. Using hping3 you are able to perform at least the following stuff:

  • Test firewall rules
  • Advanced port scanning
  • Test net performance using different protocols, packet size, TOS (type of service) and fragmentation.
  • Path MTU discovery
  • Transferring files between even really fascist firewall rules.
  • Traceroute-like under different protocols.
  • Firewalk-like usage.
  • Remote OS fingerprinting.
  • TCP/IP stack auditing.
  • A lot of others.

I've tried several traffic generators for Ubuntu, Fedora (and other) like scapy, NTG, Bit-Twist, but only hping meets my requirements. Recommended.

Example: to generate 100 packets per second TCP traffic to 192.168.0.1 with packets containing arbitrary destinations, just execute:

sudo aptitude install hping3
sudo hping3 --rand-dest --rand-dest --faster 192.168.0.1

Information Improvisation: Traffic Engineering Server is new network appliance for Bandwidth Management that is especially suitable for Broadband ISPs and SMEs.

Share This

Get changelog information from RPM and DEB package

Here is a nice Linux tip: to get change information of some RPM package it’s enough to execute the following command rpm -q --changelog package for example rpm -q --changelog openssh will output something like:


* Fri Mar 03 2006 Tomas Mraz - 4.3p2-4
- allow access if audit is not compiled in kernel (#183243)

* Sat Feb 25 2006 Tomas Mraz - 4.3p2-3
- enable the subprocess in chroot to send messages to system log
- sshd should prevent login if audit call fails

* Wed Feb 22 2006 Tomas Mraz - 4.3p2-2
- print error from scp if not remote (patch by Bjorn Augustsson #178923)

* Sat Oct 30 1999 Damien Miller
- Back to old binary names

* Fri Oct 29 1999 Damien Miller
- Use autoconf
- New binary names

* Thu Oct 28 1999 Damien Miller
- Initial RPMification, based on Jan "Yenya" Kasprzak’s spec.

To look through whole output it would be useful to use more or less commands:
rpm -q --changelog /path/to/package.rpm | less

Similar command is available also in Debian: dpkg-parsechangelog. It reads and parses the changelog of an unpacked Debian source tree and outputs the information in it to standard output in a machine-readable form.

Share This

Secure shell (ssh) session timeout

I've noticed that when I keep ssh sessions that I opened before untouched for some period of time (like 30 minutes) they become frozen and as a result I have to close ssh terminal and start a new connection. To prevent such situation I found several tips:

1) Start some utility updating the screen before leaving ssh session untouched. I usually use watch -n 1 'date' that shows current date every second. Other simple way is to send icmp requests to some host, e.g. ping google.com.

2) Increase ssh session idle time by

echo "7200" > /proc/sys/net/ipv4/tcp_keepalive_time

I've checked these tips with Fedora Core, CentOS, Debian and Ubuntu but I'm completely sure that it applicable also for other Linux distributions. First tip (ping) can be used in Unix also.

You may also be interested in:
Secure shell (ssh) connection without password
Keep ssh session saved (Unix “screen” utility)
Moving Linux to remote server (over ssh via third server)

Share This



Information Improvisation: Operating system is the backbone for every organization. Having professionals with CISSP certification in organization ensures the life running through its networks. Organizations manage tremendous amounts of traffic due to the use of pc phone and people with 646-058 certifications are ideal for this job. They can also manage online networks which can be hosted on lunarpages, which also provides free email hosting. With the company's logo design every page and a well crafted web template the site can be given a graceful look.