Wednesday, May 29, 2013

Linux::Network configuration::CentOS

1) Configure by console interfaces
system-config-network
system-config-securitylevel-tui
/etc/init.d/network restart
/etc/init.d/NetworkManager restart
service network restart

2) Working by scripts
2.1) Static

vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
BROADCAST=192.168.1.255
HWADDR=00:11:22:33:44:55
IPADDR=192.168.1.x
NETMASK= 255.255.255.0
NETWORK= 192.168.1.0
ONBOOT=yes
GATEWAY= 192.168.1.y
TYPE=Ethernet

2.2) DHCP
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes

vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=www.kusaconsultores.com
GATEWAY=192.168.1.1

vi /etc/resolv.conf
nameserver 200.48.225.130
nameserver 200.48.225.146

/etc/init.d/network restart

References:
[1]http://rm-rf.es/como-configurar-tarjetas-de-red-en-red-hat-enterprise-centos-y-fedora-core/
[2]route
http://systemadmin.es/2009/04/anadir-rutas-route-add-en-centos

No comments:

Ubuntu Forware port 80

  #!/bin/bash iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8069 iptables -t nat -A PREROUTING -i eth0 -p tc...