LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-09-2010, 11:38 AM   #1
unminser
LQ Newbie
 
Registered: May 2010
Posts: 24

Rep: Reputation: 15
how to load tun in RedHat


how to load tun in RedHat

Code:
uname -a
Linux server 2.6.18-028stab067.4 #1 SMP Thu Jan 14 17:06:11 MSK 2010 x86_64 x86_64 x86_64 GNU/Linux
 
Old 05-09-2010, 11:45 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,617

Rep: Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963
Quote:
Originally Posted by unminser View Post
how to load tun in RedHat

Code:
uname -a
Linux server 2.6.18-028stab067.4 #1 SMP Thu Jan 14 17:06:11 MSK 2010 x86_64 x86_64 x86_64 GNU/Linux
What version of RedHat are you using? And what 'tun' do you mean? The "Tun" emulator? Or the one for bridging? Asking a complete question with useful information, will get you help faster.

This link might help you.
http://www.lmgtfy.com/?q=linux+tun+load+howto+redhat
 
Old 05-09-2010, 11:48 AM   #3
unminser
LQ Newbie
 
Registered: May 2010
Posts: 24

Original Poster
Rep: Reputation: 15
http://www.linuxquestions.org/questi...un-tap-806675/

how to check RedHat ?

doesnt uname -a works?
 
Old 05-09-2010, 11:57 AM   #4
unminser
LQ Newbie
 
Registered: May 2010
Posts: 24

Original Poster
Rep: Reputation: 15
im new to linux i thought uname -a give the system inofrmation

Quote:
CentOS release 5.4 (Final)
 
Old 05-09-2010, 12:28 PM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
I've done a bit of netsearching and it seems that CentOS 5.4 by default has a tun loadable module so it's surprising that /sbin/modprobe tun doesn't work, doesn't find the tun.ko file. Let's see if it exists. Please try
Code:
find / -type f -iname '*tun*'
 
Old 05-09-2010, 12:38 PM   #6
unminser
LQ Newbie
 
Registered: May 2010
Posts: 24

Original Poster
Rep: Reputation: 15
it dont have tun.ko
Quote:
[root@server etc]# find / -type f -iname '*tun*'
/usr/include/linux/if_tun.h
/usr/include/linux/if_tunnel.h
/usr/local/bin/htund
/usr/libexec/usermin/tunnel/tunnel-lib.pl
/usr/libexec/usermin/blue-theme/pptp-client/images/tunnel.gif
/usr/libexec/webmin/pptp-client/images/tunnel.gif
/usr/libexec/webmin/tunnel/tunnel-lib.pl
/usr/libexec/webmin/fdisk/tunefs.cgi
/usr/libexec/webmin/fdisk/tunefs_form.cgi
/usr/libexec/webmin/shorewall/images/tunnels.gif
/usr/libexec/webmin/stunnel/edit_stunnel.cgi
/usr/libexec/webmin/stunnel/stunnel-lib.pl
/usr/libexec/webmin/stunnel/images/tunnel.jpg
/usr/libexec/webmin/stunnel/save_stunnel.cgi
/usr/libexec/webmin/stunnel/delete_tunnels.cgi
/usr/libexec/webmin/blue-theme/pptp-client/images/tunnel.gif
/usr/lib64/libstunnel.so
/usr/src/redhat/BUILD/openvpn-2.1.1/tun.h
/usr/src/redhat/BUILD/openvpn-2.1.1/tun.c
/usr/src/redhat/BUILD/openvpn-2.1.1/tun.o
/usr/sbin/stunnel3
/usr/sbin/stunnel
/usr/sbin/tunelp
/usr/share/man/fr/man8/stunnel.8.gz
/usr/share/man/man8/tune2fs.8.gz
/usr/share/man/man8/stunnel.8.gz
/usr/share/man/man8/tunelp.8.gz
/usr/share/man/man2/getunwind.2.gz
/usr/share/man/pl/man8/stunnel.8.gz
/usr/share/terminfo/f/fortune
/usr/share/doc/openssh-4.3p2/README.tun
/usr/share/doc/initscripts-8.45.30/ipv6-tunnel.howto
/usr/share/doc/iproute-2.6.18/ip-tunnels.ps
/usr/share/doc/stunnel-4.15/faq.stunnel-2.html
/usr/share/doc/stunnel-4.15/stunnel-pop3s-client.conf
/usr/share/doc/stunnel-4.15/stunnel-sfinger.conf
/usr/share/doc/stunnel-4.15/stunnel.conf-sample
/usr/share/doc/stunnel-4.15/VNC_StunnelHOWTO.html
/usr/share/zoneinfo/posix/Africa/Tunis
/usr/share/zoneinfo/posix/America/Pangnirtung
/usr/share/zoneinfo/Africa/Tunis
/usr/share/zoneinfo/right/Africa/Tunis
/usr/share/zoneinfo/right/America/Pangnirtung
/usr/share/zoneinfo/America/Pangnirtung
/sbin/tune2fs
/sbin/iptunnel
/root/openvpn-2.1.1/tun.h
/root/openvpn-2.1.1/tun.c
/root/openvpn-2.1.1/.deps/tun.Po
/root/openvpn-2.1.1/tun.o
/etc/sysconfig/network-scripts/ifup-tunnel
/etc/sysconfig/network-scripts/ifdown-tunnel
/etc/httpd/conf.d/swtune.conf
 
Old 05-10-2010, 04:40 PM   #7
unminser
LQ Newbie
 
Registered: May 2010
Posts: 24

Original Poster
Rep: Reputation: 15
how to add sbin to the $PATH ?

http://www.webhostingtalk.com/showthread.php?t=922960
http://www.webhostingtalk.com/showthread.php?t=595436
http://www.osresources.com/11_6_en.html

summarize the thread.
 
Old 05-11-2010, 01:24 AM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by unminser View Post
how to add sbin to the $PATH ?
For logon shells it is normally done in /etc/profile, for root at least.

In a script you can use export PATH="$PATH:/sbin".

You may also want /usr/local/sbin and /usr/sbin.

I'm not sure of the usefulness of the links regards getting tun support into the kernel which is your current stumbling block. I confess to not reading the big one past the second page but there was no mention of having to do anything special to do so. This confirms the earlier research that suggested tun support is there by default. Has the kernel been rebuilt since installation? Clearly tun.ko is not present and the fix for that is to build a new kernel -- or reinstall to get it back to default which I believe includes it.
 
Old 05-11-2010, 04:21 PM   #9
unminser
LQ Newbie
 
Registered: May 2010
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

pathmunge () {
if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
fi
}

# ksh workaround
if [ -z "$EUID" -a -x /usr/bin/id ]; then
EUID=`id -u`
UID=`id -ru`
fi

# Path manipulation
if [ "$EUID" = "0" ]; then

pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi

# No core files by default
ulimit -S -c 0 > /dev/null 2>&1

if [ -x /usr/bin/id ]; then
USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
fi

HOSTNAME=`/bin/hostname`
HISTSIZE=1000

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
INPUTRC=/etc/inputrc
fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC


for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
if [ "$PS1" ]; then
. $i
else
. $i >/dev/null 2>&1
fi
fi
done

unset i
unset pathmunge
where should i add it?

i just going to post in openvpn community.
Quote:
build a new kernel
does that mean everything will be erased?
 
Old 05-12-2010, 01:27 AM   #10
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by unminser View Post
where should i add it?

i just going to post in openvpn community.

does that mean everything will be erased?
The part that begins with if [ "$EUID" = "0" ]; then adds the sbin directories when running as root; they're not much use for other users because the commands in the sbin directories mostly need to be run as root. If you still want them for a non-root user then better to do it on a per-user basis rather than system-wide so better set PATH in ~/.bash_profile for login shells and ~/.bashrc for non-login shells.

Linux is designed so you can build a new kernel without erasing anything and choose between old and new kernels at boot time.
 
Old 05-17-2010, 09:50 AM   #11
unminser
LQ Newbie
 
Registered: May 2010
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
if [ "$EUID" = "0" ]; then
PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin"
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
Quote:
[root@server /]# modprobe
bash: modprobe: command not found
[root@server /]# /sbin/modprobe
Usage: /sbin/modprobe [-v] [-V] [-C config-file] [-n] [-i] [-q] [-b] [-o <modname>] <modname> [parameters...]
/sbin/modprobe -r [-n] [-i] [-v] <modulename> ...
/sbin/modprobe -l -t <dirname> [ -a <modulename> ...]
it didnt work.
how to build a new kernel ?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vnuml tun device /dev/net/tun not found. asalford Linux - Networking 1 01-30-2007 10:11 PM
Redhat 8.0 - Load average f0nzie Red Hat 5 09-28-2005 04:21 PM
RedHat wont load wannabpunker188 Linux - Newbie 9 09-22-2005 12:02 AM
TUN TAP for non-Redhat Machine Echo Kilo Linux - Networking 3 12-19-2004 06:16 PM
RedHat 6.2...GUI Doesn't load up Pudgicle Linux - Software 4 04-24-2001 09:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration