01-09-2002
Any knowledge for sysctl?
HI folks. I am developing a protocol and I need to bind to an IP address that is not configured to my machine. The problem is with bind(). The sysctl system call seamed to overcome the problem of bind if you set the proc/sys/net/ipv4/ip_nonlocal_bind flag. Although I tryed to set the flag either from command line by writing sysctl -w net.ipv4.ip_nonlocal_bind=1, or echo 1>proc/sys/net/ipv4/ip_nonlocal_bind, or programmatically by using the command sysctl(), or by seting its value from the /etc/sysctl.conf file, bind still generates an error. Does anybody have any idea of why this is happening? Is there any other way to bind to a non local IP address?
PS. In the kernel configuration the sysctl support(CONFIG_SYSCTL) is enabled together with the /proc file system support (CONFIG_PROC_FS).
7 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am a new Unix user looking for ways, other than time, to become an effective unix administrator. All sugestions welcome.
Thanks (10 Replies)
Discussion started by: dtooth71
10 Replies
2. UNIX for Dummies Questions & Answers
Hai, friends.
In one exam which i have to attend in the month of january, they asked "knowledge of c and unix are required" .
I am beginner to unix, even i dont know from where to start .
Please suggest me what to do , to get through the exam and interview.
I have already downloaded... (2 Replies)
Discussion started by: nani_ynm
2 Replies
3. AIX
Dear All
Kindly provide me with a difference between hdiskpower and hdisk
regards (2 Replies)
Discussion started by: magasem
2 Replies
4. Shell Programming and Scripting
Can somebody explain me the following part within a awk command:
awk '{for(i=1;i<=NF;i++) if ($i=="mm")c++}
Can somebody please explain me the part (i=1;i<=NF;i++) ????:D:D:D:D (1 Reply)
Discussion started by: RubinPat
1 Replies
5. Linux
Blitz PHP
I am having trouble installing Blitz PHP blitz-0.6.10.tar.gz
Here is what i did:
cd /tmp
wget blitz-0.6.10.tar.gz
tar zxfv blitz-0.6.10.tar.gz
cd blitz-0.6.10
And then I tried
./configure
Output: -bash: No such file in directory
make
Output: No targets in the... (1 Reply)
Discussion started by: kendel
1 Replies
6. UNIX for Dummies Questions & Answers
As per Hardening guide for the server.
ICMP Broadcast Response: The kernel parameter icmp_echo_ignore_broadcasts must match to 1
However when i check the value of icmp_echo_ignore_broadcasts it thrown an error as unkonwn key.
# sysctl icmp_echo_ignore_broadcasts
error:... (2 Replies)
Discussion started by: pinga123
2 Replies
7. Shell Programming and Scripting
Hi Friends,
I know very well the basic commands of Unix but i want to concentrate on unix shell programming can you please how to learn and suggest me how to become comfortable level.
Thanks in advance (1 Reply)
Discussion started by: victory
1 Replies
LEARN ABOUT REDHAT
sysctl
SYSCTL(8) SYSCTL(8)
NAME
sysctl - configure kernel parameters at runtime
SYNOPSIS
sysctl [-n] [-e] variable ...
sysctl [-n] [-e] -w variable=value ...
sysctl [-n] [-e] -p <filename> (default /etc/sysctl.conf)
sysctl [-n] [-e] -a
sysctl [-n] [-e] -A
DESCRIPTION
sysctl is used to modify kernel parameters at runtime. The parameters available are those listed under /proc/sys/. Procfs is required for
sysctl(8) support in Linux. You can use sysctl(8) to both read and write sysctl data.
PARAMETERS
variable
The name of a key to read from. An example is kernel.ostype. The '/' separator is also accepted in place of a '.'.
variable=value
To set a key, use the form variable=value, where variable is the key and value is the value to set it to. If the value contains
quotes or characters which are parsed by the shell, you may need to enclose the value in double quotes. This requires the -w param-
eter to use.
-n Use this option to disable printing of the key name when printing values.
-e Use this option to ignore errors about unknown keys.
-w Use this option when you want to change a sysctl setting.
-p Load in sysctl settings from the file specified or /etc/sysctl.conf if none given.
-a Display all values currently available.
-A Display all values currently available in table form.
EXAMPLES
/sbin/sysctl -a
/sbin/sysctl -n kernel.hostname
/sbin/sysctl -w kernel.domainname="example.com"
/sbin/sysctl -p /etc/sysctl.conf
FILES
/proc/sys /etc/sysctl.conf
SEE ALSO
sysctl.conf(5)
BUGS
The -A parameter behaves just as -a does.
AUTHOR
George Staikos, <staikos@0wned.org>
21 Sep 1999 SYSCTL(8)