There are so many processes to block ICMP ping in RHEL5. This process is about “How to block ICMP packets through Kernel Configuration?”
Persistent system configuration : sysctl -a (Lists all current kernel settings)
Settings a /proc value dynamically : sysctl –w (Kernel settings)
Reloading Kernel settings : sysctl –p
To block ICMP packets : /proc/sys/net/ipv4/icmp_echo_ignore_all
: Search for sysctl –a grep net।ipv4।icmp_echo_ignore_all
set the value
Sysctl –w net.ipv4.icmp_echo_ignore_all=1
Ping “IPAddress”
PING 192.168.x.x (192.168.x.x) 56(84) bytes of data.
No response...
Sysctl –w net.ipv4.icmp_echo_ignore_all=0
PING 192.168.x.x (192.168.x.x) 56(84) bytes of data.
64 bytes from 192.168.x.x: icmp_seq=1 ttl=64 time=0.889 ms
--- 192.168.x.x ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4002ms
rtt min/avg/max/mdev = 0.079/0.261/0.889/0.315 ms
If you want to make this persistent across reboots..!
Edit /etc/sysctl.conf
Search for net.ipv4.icmp_echo_ignore_all
Change the value to 1 or 0 as per your requirement.
Update your system kernel settings : Sysctl –p
Shutdown –r now
Ping “IPAddress”
PING 192.168.x.x (192.168.x.x) 56(84) bytes of data.
No response ...
September 30, 2007
September 29, 2007
Creating a Private Repository In RHEL5 and installing Packages with yum
To create a private repositroy in RHEL5 the following package should be installed in your system.
Createrepo *.rpm file - To know the package is installed in your system or not ?
rpm –qa grep createrepo* (or) rpm-q createrepo
To install it : rpm –ivh createrepo*।rpm
rpm –qa grep yum* (or) rpm-q yum
To install it : rpm –ivh yum*.rpm (All Packages)
Run command createrepo –v /package/RPMS
(Put all your packages in /var/www/html/(Create Directory for RPM packages) and start your http server by executing the command service httpd start or chkconfig –level 12345 httpd on
Or
Put all your packages in var/ftp/pub/RPMS and start your ftp server with service vsftpd start or chkconfig –level 35 vsftpd on)
Ex:- createrepo –v /var/www/html/RPMS
Do http://localhost/RPMS/ (firefox)
You have created a repoistory.
Configuring yum package manager
Create a file in /etc/yum।repos.d for your repository.
Enter the following infromation
[RHEL RPM Repositroy ]
Name = private
Baseurl= URL of RPM packages (http://localhost/RPMS)
Enabled=1
Gpgcheck=0 or 1 (local system 0 ) or (GNU Public license if gpgcheck is 1)
Test it with ...yum list anypackage
You can install your packages by typing ....yum install *anypackage*
Createrepo *.rpm file - To know the package is installed in your system or not ?
rpm –qa grep createrepo* (or) rpm-q createrepo
To install it : rpm –ivh createrepo*।rpm
rpm –qa grep yum* (or) rpm-q yum
To install it : rpm –ivh yum*.rpm (All Packages)
Run command createrepo –v /package/RPMS
(Put all your packages in /var/www/html/(Create Directory for RPM packages) and start your http server by executing the command service httpd start or chkconfig –level 12345 httpd on
Or
Put all your packages in var/ftp/pub/RPMS and start your ftp server with service vsftpd start or chkconfig –level 35 vsftpd on)
Ex:- createrepo –v /var/www/html/RPMS
Do http://localhost/RPMS/ (firefox)
You have created a repoistory.
Configuring yum package manager
Create a file in /etc/yum।repos.d for your repository.
Enter the following infromation
[RHEL RPM Repositroy ]
Name = private
Baseurl= URL of RPM packages (http://localhost/RPMS)
Enabled=1
Gpgcheck=0 or 1 (local system 0 ) or (GNU Public license if gpgcheck is 1)
Test it with ...yum list anypackage
You can install your packages by typing ....yum install *anypackage*
September 28, 2007
Troubleshooting concepts: Linux: Setting up a static IPAddress
System to configure static networking rather than Dynamic IPAddress
Before going to set static addressing , Please note down the following things in your network
Change the contents of /etc/sysconfig/network-scripts/ifcfg-eth0
Device=eth0
BOOTPROTO=None #( Don’t forget to change it from dhcp to none)
ONBOOT=yes
#Add IPAddress here :
IPADDR=192.168.1.x
#Add NETMASK
NETMASK=255.255.255.0
#Add GATEWAY
GATEWAY: 192.168.1.x
Make sure that your hostname is correct.
Open your /etc/sysconfig/network and check your hostname
HOSTNAME=Example
Verify that hostname can be resolved with out using DNS
127.0.0.1 localhost.localdomain localhost
192.168.1.2 example example.example.com
Bring up eth0 ...............ping machine...............it works ...!
Restart your machine with : shutdown -r now
ping machine.........it works...!
Before going to set static addressing , Please note down the following things in your network
1. IP Address of the machine
2. NETMASK and GATEWAY
3. Routing ( Default via 192.168.1.x dev eth0)
4. nameserver in the /etc/resolv.conf
- search domain.com
- nameserver 192.168.1.x
Change the contents of /etc/sysconfig/network-scripts/ifcfg-eth0
Device=eth0
BOOTPROTO=None #( Don’t forget to change it from dhcp to none)
ONBOOT=yes
#Add IPAddress here :
IPADDR=192.168.1.x
#Add NETMASK
NETMASK=255.255.255.0
#Add GATEWAY
GATEWAY: 192.168.1.x
Make sure that your hostname is correct.
Open your /etc/sysconfig/network and check your hostname
HOSTNAME=Example
Verify that hostname can be resolved with out using DNS
127.0.0.1 localhost.localdomain localhost
192.168.1.2 example example.example.com
Bring up eth0 ...............ping machine...............it works ...!
Restart your machine with : shutdown -r now
ping machine.........it works...!
Subscribe to:
Posts (Atom)