Browsing the archives for the Configuring Ubuntu tag.


Updated IPtables Configuration File – 4-20-2010

Configuring Ubuntu, F.A.Q.'s, How To's, IDS, LAMP, Open Source, P.C. Linux, Routers, Security, Tech Industry News, Ubuntu, Ubuntu Server, virtual machines, Virtualization

#—————————————————————
# Initialize all the chains by removing all the rules
# tied to them
#—————————————————————

iptables –flush
iptables -t nat –flush
iptables -t mangle –flush

#—————————————————————
# The loopback interface should accept all traffic
# Necessary for X-Windows and other socket based services
#—————————————————————

iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT

#—————————————————————
# Allow outbound DNS queries from the FW and the replies too
#
# – Interface eth0 is the internet interface
#
# Zone transfers use TCP and not UDP. Most home networks
# websites using a single DNS server won’t require TCP statements
#
#—————————————————————

iptables -A OUTPUT -p udp -o eth0 –dport 53 –sport 1024:65535 \
-j ACCEPT
iptables -A INPUT -p udp -i eth0 –sport 53 –dport 1024:65535 \
-j ACCEPT

#—————————————————————
# Allow previously established connections
# – Interface eth0 is the internet interface
#—————————————————————

iptables -A OUTPUT -o eth0 -m state –state ESTABLISHED,RELATED \
-j ACCEPT

#—————————————————————
# Allow port 80 (www) and 22 (SSH) connections to the firewall
#—————————————————————

iptables -A INPUT -p tcp -i eth0 –dport 22 –sport 1024:65535 \
-m state –state NEW -j ACCEPT

iptables -A INPUT -p tcp -i eth0 –dport 80 –sport 1024:65535 \
-m state –state NEW -j ACCEPT

#—————————————————————
# Allow port 80 (www) and 443 (https) connections from the firewall
#—————————————————————

iptables -A OUTPUT -j ACCEPT -m state \
–state NEW,ESTABLISHED,RELATED -o eth0 -p tcp \
-m multiport –dport 80,443 -m multiport –sport 1024:65535

#—————————————————————
# Allow previously established connections
# – Interface eth0 is the internet interface
#—————————————————————

iptables -A INPUT -j ACCEPT -m state –state ESTABLISHED,RELATED \
-i eth0 -p tcp

#—————————————————————
# If a packet doesn’t match one of the built in chains, then
# The policy should be to drop it
#—————————————————————

iptables -A INPUT -j DROP
iptables -A OUTPUT -j DROP
iptables -A FORWARD -j DROP

No Comments

update ubuntu from within the shell

Configuring Ubuntu, F.A.Q.'s, How To's, LAMP, Open Source, P.C. Linux, Security, Tech Industry News, Ubuntu, Ubuntu Server

Two Simple Steps for updating ubuntu form within the shell:

sudo apt-get update

sudo apt-get upgrade

Video Walkthrough Below:


YouTube

No Comments

How to set a static IP in Ubuntu Server from the shell.

Configuring Ubuntu, F.A.Q.'s, Fast Track, How To's, LAMP, Open Source, P.C. Linux, Ubuntu, Ubuntu Server

Here is the simple instructions and a video below.

sudo nano /etc/network/interfaces

look for this:

# The primary network interface
auto eth0
iface eth0 inet dhcp

Change it to this or whatever IP configuration you would like to use:

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

Here is a walk through video:


YouTube

No Comments

Install Gnome on Ubuntu Server

Configuring Ubuntu, F.A.Q.'s, Fast Track, How To's, LAMP, Open Source, P.C. Linux, Tech Industry News, Ubuntu, Ubuntu Server

Here is an easy to use YouTube Video with code and instruction below:


YouTube view

Use the following command to install GUI

sudo apt-get update

sudo apt-get install ubuntu-desktop

If you wan to install a graphical desktop manager without some of the desktop addons like Evolution and OpenOffice, but continue to use the server flavor kernel use the following command

sudo aptitude install --no-install-recommends ubuntu-desktop

If you want to install light weight desktop install xfce using the following command

sudo apt-get install xubuntu-desktop

If you want to install KDE desktop use the following command

sudo apt-get install kubuntu-desktop

No Comments

IPtables for Dummies (a beginners guide to IPtables firewall)

Configuring Ubuntu, F.A.Q.'s, How To's, IDS, LAMP, Open Source, P.C. Linux, Security, Ubuntu, Virtualization

I always have people asking me for a dummies guide to IPtables, and in all reality their isn’t one it takes time, reading, and understanding to use it properly. If IPtables is used properly and effectively it can save you hundreds of dollars in networking equipment and time. Here is a collection of several IPtables how-to’s and links I have collected for people through the years.

No Comments