Create Free Blog | Random Blog »   Report Abuse | Login   

 

Linux RHEL & UBUNTU TIPS

Just another Blog.co.in weblog

Troubleshooting LTSP : Firewall

March17

Firewall
You wil want to do a lot of testing with firewall before you call it good. This is an area that often will cause you problems. If you are using the ufw firewall then you will want to enable it first.

Linux Terminal Server Firewall ( DHCP, SSH, Samba)
You will need to enable several ports for a LTSP server as it will provide DHCP on ports 67, 68 UDP and you may have Samba enabled on ports 139, 445 and of course you want SSH on port 22.

ufw allow 67/udp
ufw allow 68/udp
ufw allow 139/tcp
ufw allow 445/tcp
 

 

How to Install SSH Server in Ubuntu Linux

January21

SSH Server is a secured, encrypted way to make connections to remote hosts or servers. A SSH server accepts connections from SSH aware clients.

Enabling public-key authentication. Transferring files and directories between computers over a secure connection. You can run shell and X based programs remotely using SSH.

Install SSH Server

$ sudo apt-get install openssh-client openssh-server

 How to SSH into a remote Ubuntu machine with ip address 192.168.0.1

(Assuming that the remote Ubuntu machine has installed SSH Server service

or install $sudo apt-get install openssh-client)

$ ssh username@192.168.0.1 ( now it will display an authentication warning then press yes )

How to copy files/folders from a remote Ubuntu machine into a local machine (scp)
(Remote Ubuntu machine IP address:192.168.0.1,Remote files/folders location: /home/username/remotefile.txt

Local machine save location: . (current directory)
$ scp -r username@192.168.0.1:/home/username/remotefile.txt

How to SSH into a remote Ubuntu machine from a Windows machine?

Download and run PuTTY

How to copy files/folders from/into a remote Ubuntu machine from a Windows machine

Download and install  WinSCP

 

Share SocialTwist Tell-a-Friend 

How to Add open files as root in right click menu

January21

gedit $HOME/.gnome2/nautilus-scripts/Open\ as\ rootInsert the following lines into the new file 

 

for uri in $NAUTILUS_SCRIPT_SELECTED_URIS; do
gnome-sudo “gnome-open $uri” &
done
Save the edited file

chmod +x $HOME/.gnome2/nautilus-scripts/Open\ as\ root
Right click on the file and Scripts->Open as root

Easy Transparent proxy configuration for Ubuntu

January21

This is another easy way for installing transparent proxy

First of all, install squid

$ sudo apt-get install squid

Now edit the configuration file /etc/squid/squid.conf.

$ sudo vi /etc/squid/squid.conf

Find this in squid.conf and change it

visible_hostname yourdomain.com (no need)
cache_mgr panayara@gmail.com (no need)
http_port 3128 transparent
always_direct allow all
cache_dir ufs /var/spool/squid 500 16 256

That’s all you need to change on squid.conf

Now create the cache directory by typing

$ sudo squid -z

Now you can restart squid

$ sudo /etc/init.d/squid restart

Finished? NOT YET..

We are now have to set for transparent proxy. Transparent proxy means that we don’t have to enter any proxy address on browser. If we browse a website, we are going to port 80. But with this tutorial, we’re forwarding any connection that’s going to port 80 to our squid server automatically. So let’s start setting this.

$ sudo echo 1 > /proc/sys/net/ipv4/ip_forward

This method is to enabling ip forwarding

Put that script in your startup scripts .

Now you have to put masquerading method so you can forward the connection

$ sudo apt-get install ipmasq

Last step..

$ sudo iptables -A PREROUTING -t nat -p tcp –dport 80 -j REDIRECT –to-port 3128

This command is for forward any request on port 80, will be forwarded to port 3128 (our squid port)

Now you can run transparent squid proxy

$ sudo /etc/init.d/squid start

Now your Transparent Proxy server is ready to work

Share SocialTwist Tell-a-Friend 

Howto Setup Root Password in Ubuntu Linux

January21

Lot of people are confusing with root password in Ubuntu linux. It is not need for ordinary users, they can just use ‘’sudo” and “gksudo” that is more than enough. But some power users need to login as “root” user. Now you must setup a password for “root”. 

Open up a terminal and typeOpen up a terminal and type

 

sudo passwd root 

Now it ask for the root password . You can set it. You can login as root in terminals now.Now it ask for the root password . You can set it. You can login as root in terminals now.

 

 

But ubuntu will not allow you to login as root in X-session (Graphics). If you want to login as root in X-session Do the followingSelect

 

 

System–> Administration–>Login Window

then Select Security tab
Tick Mark the Allow local system administrator login

Share SocialTwist Tell-a-Friend 

Howto Solve Static IP Problem in Ubuntu 8.10

January21

NetworkManager program provided in Ubuntu 8.10 is mainly aiming to provide a simplified Internet connection. NetworkManager is best for home users and simple internet users. If you want to use a fixed IP address it makes problem, the static IP setting will be work only upto the next restart. After reboot you can’t see the Fixed IP. It will reset to DHCP. 

Solution for this problem Solution for this problem

 

 

Uninstall NetworkManager is the only solution
sudo apt-get remove network-manager network-manager-gnome  

After that configure manualy the interfacesModify the following file: /etc/networks/interfaces.

gksudo gedit /etc/network/interfaces You can see the following in this file

auto lo
iface lo inet loopback  

keep it as suchadd the following

 

auto eth0auto eth0

 

 


iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0 if you have morethan one network card and
you want to set a DHCP in eth1 use the following 

 

auto eth1
iface eth1 inet dhcp Now Restart the network 

sudo /etc/init.d/networking restart

 

sudo /etc/init.d/networking restart

sudo /etc/init.d/networking restart

Share SocialTwist Tell-a-Friend 

Howto detect Free and Non-free packages installed in ubuntu

January16

VRMS is a tool for finding free and non-free packages installed in your debian-based system like ubuntu. This genius tool provide an explanation of why it is free and non-free.

For Install vrms
$sudo apt-get install vrms

after installation you can run it in a terminal window.

Howto get your system specification in ubuntu

January16

There is a simple way to find the Hardware specification of your computer.

open a terminal windows and type the following

$lshw this will give the full hardware details in an ugly text format

Now you can try the follwing

$lshw -html > abcd.html

open the abcd.html file in web browser (firefox)

man2html : Ubunutu Man pages in Firefox

January16

Properly formated man pages in Mozilla Firefox (or any browser) is a dream of linux users, if it has a search facility? great!!!

First you have to install man2html using Synaptic or apt

$ sudo apt-get install man2html

Then open Mozilla Firefox and do the following

Go to Bookmarks > Organize Bookmarks;
Open a bookmark folder then right-click and chose New Bookmark
;
Name the new bookmark Man;

In the Location field paste this line:

http://localhost/cgi-bin/man/man2html?query=%s

In the Keyword field type man;
Click Add.

Now you try man ls in address bar of your browser

You can try

http://localhost/cgi-bin/man/man2html?query=

also, before adding bookmark just cut and paste the above to your browsers address bar

Share SocialTwist Tell-a-Friend 

Easiest way to install Ubuntu server Applications like Apache, PHP, Mysql (LAMP)

January16

Wonderful Ubuntu Trick

Easiest way to install Ubuntu server Applications like Apache, PHP, Mysql (LAMP), JAVA, DNS and Everything You need .

open a terminal and type

$ sudo tasksel

now you can see a text based installation screen will then allow you to install a LAMP server, Samba, Tomcat Java server, OpenSSH, DNS server and lot of other stuff.

« Older Entries