Something in Unix/Linux

 

How to check Linux VERSION

root@ubuntu:~# uname -a
Linux ubuntu 3.0.0-16-generic #28-Ubuntu SMP Fri Jan 27 17:44:39 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

 

[root@svr:~]# dmidecode -t system
# dmidecode 2.7
SMBIOS 2.3 present.

Handle 0x0100, DMI type 1, 25 bytes.
System Information
Manufacturer: HP
Product Name: ProLiant DL320 G4
Version: Not Specified
Serial Number: CN7644029B
UUID: 34313037-3836-434E-3736-343430323942
Wake-up Type: Power Switch

Handle 0x2000, DMI type 32, 11 bytes.
System Boot Information
Status: No errors detected

dmidecode -t … you can use all these arguments with -t ,

bios
system
baseboard
chassis
processor
memory
cache
connector
slot

[root@svr:~]# lsb_release -a
LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: Fedora
Description: Fedora release 7 (Moonshine)
Release: 7
Codename: Moonshine
[root@svr ~]#

Basic iptables howto

https://help.ubuntu.com/community/IptablesHowTo

 

Disable / Turn Off Firewall in Ubuntu Linux Server

How do I disable firewall in Ubuntu Linux server edition?

You can type the following command to see if firewall is active or not (open a terminal or ssh session and type the following command):
$ sudo iptables -L -n
Sample outputs:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           udp dpt:53
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:53
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           udp dpt:67
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:67
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  0.0.0.0/0            192.168.122.0/24    state RELATED,ESTABLISHED
ACCEPT     all  --  192.168.122.0/24     0.0.0.0/0
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-port-unreachable
REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-port-unreachable
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

You can save existing firewall rules as follows:
$ sudo iptables-save > firewall.rules
Finally, type the following commands to stop firewall:
$ sudo iptables -X
$ sudo iptables -t nat -F
$ sudo iptables -t nat -X
$ sudo iptables -t mangle -F
$ sudo iptables -t mangle -X
$ sudo iptables -P INPUT ACCEPT
$ sudo iptables -P FORWARD ACCEPT
$ sudo iptables -P OUTPUT ACCEPT

A Note About ufw

The latest version of Ubuntu comes with ufw (now it is the default firewall configuration tool for Ubuntu). It is developed to ease iptables firewall configuration, ufw provides a user friendly way to create an IPv4 or IPv6 host-based firewall. To disable ufw, enter:
$ sudo ufw disable
You can also use GUI tool to enable or disable Firewall under Ubuntu Linux desktop edition by visiting System > Administration > Firewall configuration option:

Fig.01: Disabling Firewall In Ubuntu Linux

Fig.01: Disabling Firewall In Ubuntu Linux
Simply unselect “Enabled” option to turn off the firewall.