Sponsored Content
Top Forums Programming IP address of a server at runtime Post 302665501 by chercheur857 on Monday 2nd of July 2012 05:24:04 PM
Old 07-02-2012
Thank you for your answers
You mean:
I assign to the server a hostname (for example : serv) and the client get the @ip of the server by get-host-by-name (serv) ?


Thank you
 

10 More Discussions You Might Find Interesting

1. IP Networking

Finding an x25 address for a server

I am trying to find the x25 address of a server. Presumably this is stored in some sort of config file - and while I can find the IP and OSI addresses - I cannot work out where to find the x25 address.....any ideas? (Unix on Solaris) (1 Reply)
Discussion started by: peter.herlihy
1 Replies

2. UNIX for Dummies Questions & Answers

How to find i.p address of our server

I don't have root access. How do I find i.p address of our sun server? Thanks. (4 Replies)
Discussion started by: vpotluri
4 Replies

3. UNIX for Dummies Questions & Answers

how to get the server name using IP address

Hi all, what is the comamnd to get the server address using the IP address ? Please help. Thanks, Sona. (3 Replies)
Discussion started by: Sona
3 Replies

4. Shell Programming and Scripting

Getting the IP address in unix server

Hi, I want to know the IP of my Unix server in my script programming. Below are the my trial and i didn't find anything useful for me.because i want only IP. hostname -> Giving the name of the server and hostanme -i -> Giving the error message that..i am not super user. ipConfig ->... (7 Replies)
Discussion started by: Balamani
7 Replies

5. IP Networking

Getting IP address of a server

Hello, I have a server in C that is listening on a socket using s_addr = INADDR_ANY, and clients connect to it. How can I know which address did the client use to connect to that socket? It might be 127.0.0.1 (if the server is running locally), 192.168.x.x (if the client is from inside the... (1 Reply)
Discussion started by: royger
1 Replies

6. HP-UX

[SOLVED] HP UX SERVER IP ADDRESS

I am moving an HP UX 9000 server to a new subnet. How do I change the server's IP address?? Many thanks in advance :confused: (3 Replies)
Discussion started by: ldaliosmane
3 Replies

7. AIX

Java Runtime Execution require reboot of pSeries server regularly?

Dear all experts, Recently the daily batch run process (run using Java Runtime Execution)suddenly run slow. Our apps vendor came in and check and request to reboot the server. After rebooting of the server, the batch run back to normal. May I know is periodically rebooting of pSeries server is a... (9 Replies)
Discussion started by: kwliew999
9 Replies

8. Red Hat

DHCP Server address

Where can you find your DHCP Server address? I checked all of the files that this mentioned with no luck. Quick HOWTO : Ch08 : Configuring the DHCP Server - Linux Home Networking (6 Replies)
Discussion started by: cokedude
6 Replies

9. Shell Programming and Scripting

External IP Address of Linux Server

Hi, I am trying to find the external IP address of a server "XXX". I logged into server "XXX" and executed nslookup XXX. output number is 123.23.23.45 Later, i have executed "curl http://whatismyip.org". This time i got a different number 611.34.63.22 Out of these two numbers, what number... (1 Reply)
Discussion started by: forums123456
1 Replies

10. Red Hat

Ip address of Linux server

Hi, How to find ip address of Linux servers ? I know by ping command we can find ip address but wanted to check with you. Thanks, Maddy (5 Replies)
Discussion started by: Maddy123
5 Replies
gnutls-serv(1)							   User Commands						    gnutls-serv(1)

NAME
gnutls-serv - GnuTLS server SYNOPSIS
gnutls-serv [-flag [value]]... [--opt-name[[=| ]value]]... All arguments must be options. DESCRIPTION
Server program that listens to incoming TLS connections. OPTIONS
-d number, --debug=number Enable debugging.. This option takes an integer number as its argument. The value of number is constrained to being: in the range 0 through 9999 Specifies the debug level. --noticket Don't accept session tickets. -g, --generate Generate Diffie-Hellman and RSA-export parameters. -q, --quiet Suppress some messages. --nodb Do not use a resumption database. --http Act as an HTTP server. --echo Act as an Echo server. -u, --udp Use DTLS (datagram TLS) over UDP. --mtu=number Set MTU for datagram TLS. This option takes an integer number as its argument. The value of number is constrained to being: in the range 0 through 17000 --srtp-profiles=string Offer SRTP profiles. -a, --disable-client-cert Do not request a client certificate. -r, --require-client-cert Require a client certificate. -b, --heartbeat Activate heartbeat support. Regularly ping client via heartbeat extension messages --x509fmtder Use DER format for certificates to read from. --priority=string Priorities string. TLS algorithms and protocols to enable. You can use predefined sets of ciphersuites such as PERFORMANCE, NORMAL, SECURE128, SECURE256. Check the GnuTLS manual on section "Priority strings" for more information on allowed keywords --dhparams=file DH params file to use. --x509cafile=string Certificate file or PKCS #11 URL to use. --x509crlfile=file CRL file to use. --pgpkeyfile=file PGP Key file to use. --pgpkeyring=file PGP Key ring file to use. --pgpcertfile=file PGP Public Key (certificate) file to use. --x509keyfile=string X.509 key file or PKCS #11 URL to use. --x509certfile=string X.509 Certificate file or PKCS #11 URL to use. --x509dsakeyfile=string Alternative X.509 key file or PKCS #11 URL to use. --x509dsacertfile=string Alternative X.509 Certificate file or PKCS #11 URL to use. --x509ecckeyfile=string Alternative X.509 key file or PKCS #11 URL to use. --x509ecccertfile=string Alternative X.509 Certificate file or PKCS #11 URL to use. --pgpsubkey=string PGP subkey to use (hex or auto). --srppasswd=file SRP password file to use. --srppasswdconf=file SRP password configuration file to use. --pskpasswd=file PSK password file to use. --pskhint=string PSK identity hint to use. --ocsp-response=file The OCSP response to send to client. If the client requested an OCSP response, return data from this file to the client. -p number, --port=number The port to connect to. This option takes an integer number as its argument. -l, --list Print a list of the supported algorithms and modes. Print a list of the supported algorithms and modes. If a priority string is given then only the enabled ciphersuites are shown. -h, --help Display usage information and exit. -!, --more-help Pass the extended usage information through a pager. -v [{v|c|n}], --version[={v|c|n}] Output version of program and exit. The default mode is `v', a simple version. The `c' mode will print copyright information and `n' will print the full copyright notice. EXAMPLES
Running your own TLS server based on GnuTLS can be useful when debugging clients and/or GnuTLS itself. This section describes how to use gnutls-serv as a simple HTTPS server. The most basic server can be started as: gnutls-serv --http It will only support anonymous ciphersuites, which many TLS clients refuse to use. The next step is to add support for X.509. First we generate a CA: $ certtool --generate-privkey > x509-ca-key.pem $ echo 'cn = GnuTLS test CA' > ca.tmpl $ echo 'ca' >> ca.tmpl $ echo 'cert_signing_key' >> ca.tmpl $ certtool --generate-self-signed --load-privkey x509-ca-key.pem --template ca.tmpl --outfile x509-ca.pem Then generate a server certificate. Remember to change the dns_name value to the name of your server host, or skip that command to avoid the field. $ certtool --generate-privkey > x509-server-key.pem $ echo 'organization = GnuTLS test server' > server.tmpl $ echo 'cn = test.gnutls.org' >> server.tmpl $ echo 'tls_www_server' >> server.tmpl $ echo 'encryption_key' >> server.tmpl $ echo 'signing_key' >> server.tmpl $ echo 'dns_name = test.gnutls.org' >> server.tmpl $ certtool --generate-certificate --load-privkey x509-server-key.pem --load-ca-certificate x509-ca.pem --load-ca-privkey x509-ca-key.pem --template server.tmpl --outfile x509-server.pem For use in the client, you may want to generate a client certificate as well. $ certtool --generate-privkey > x509-client-key.pem $ echo 'cn = GnuTLS test client' > client.tmpl $ echo 'tls_www_client' >> client.tmpl $ echo 'encryption_key' >> client.tmpl $ echo 'signing_key' >> client.tmpl $ certtool --generate-certificate --load-privkey x509-client-key.pem --load-ca-certificate x509-ca.pem --load-ca-privkey x509-ca-key.pem --template client.tmpl --outfile x509-client.pem To be able to import the client key/certificate into some applications, you will need to convert them into a PKCS#12 structure. This also encrypts the security sensitive key with a password. $ certtool --to-p12 --load-ca-certificate x509-ca.pem --load-privkey x509-client-key.pem --load-certificate x509-client.pem --outder --outfile x509-client.p12 For icing, we'll create a proxy certificate for the client too. $ certtool --generate-privkey > x509-proxy-key.pem $ echo 'cn = GnuTLS test client proxy' > proxy.tmpl $ certtool --generate-proxy --load-privkey x509-proxy-key.pem --load-ca-certificate x509-client.pem --load-ca-privkey x509-client-key.pem --load-certificate x509-client.pem --template proxy.tmpl --outfile x509-proxy.pem Then start the server again: $ gnutls-serv --http --x509cafile x509-ca.pem --x509keyfile x509-server-key.pem --x509certfile x509-server.pem Try connecting to the server using your web browser. Note that the server listens to port 5556 by default. While you are at it, to allow connections using DSA, you can also create a DSA key and certificate for the server. These credentials will be used in the final example below. $ certtool --generate-privkey --dsa > x509-server-key-dsa.pem $ certtool --generate-certificate --load-privkey x509-server-key-dsa.pem --load-ca-certificate x509-ca.pem --load-ca-privkey x509-ca-key.pem --template server.tmpl --outfile x509-server-dsa.pem The next step is to create OpenPGP credentials for the server. gpg --gen-key Make a note of the OpenPGP key identifier of the newly generated key, here it was 5D1D14D8. You will need to export the key for GnuTLS to be able to use it. gpg -a --export 5D1D14D8 > openpgp-server.txt gpg --export 5D1D14D8 > openpgp-server.bin gpg --export-secret-keys 5D1D14D8 > openpgp-server-key.bin gpg -a --export-secret-keys 5D1D14D8 > openpgp-server-key.txt Let's start the server with support for OpenPGP credentials: gnutls-serv --http --pgpkeyfile openpgp-server-key.txt --pgpcertfile openpgp-server.txt The next step is to add support for SRP authentication. This requires an SRP password file created with srptool. To start the server with SRP support: gnutls-serv --http --srppasswdconf srp-tpasswd.conf --srppasswd srp-passwd.txt Let's also start a server with support for PSK. This would require a password file created with psktool. gnutls-serv --http --pskpasswd psk-passwd.txt Finally, we start the server with all the earlier parameters and you get this command: gnutls-serv --http --x509cafile x509-ca.pem --x509keyfile x509-server-key.pem --x509certfile x509-server.pem --x509dsakeyfile x509-server-key-dsa.pem --x509dsacertfile x509-server-dsa.pem --pgpkeyfile openpgp-server-key.txt --pgpcertfile openpgp-server.txt --srppasswdconf srp-tpasswd.conf --srppasswd srp-passwd.txt --pskpasswd psk-passwd.txt EXIT STATUS
One of the following exit values will be returned: 0 (EXIT_SUCCESS) Successful program execution. 1 (EXIT_FAILURE) The operation failed or the command syntax was not valid. 70 (EX_SOFTWARE) libopts had an internal operational error. Please report it to autogen-users@lists.sourceforge.net. Thank you. SEE ALSO
gnutls-cli-debug(1), gnutls-cli(1) AUTHORS
Nikos Mavrogiannopoulos, Simon Josefsson and others; see /usr/share/doc/gnutls-bin/AUTHORS for a complete list. COPYRIGHT
Copyright (C) 2000-2012 Free Software Foundation all rights reserved. This program is released under the terms of the GNU General Public License, version 3 or later. BUGS
Please send bug reports to: bugs@gnutls.org NOTES
This manual page was AutoGen-erated from the gnutls-serv option definitions. 3.1.18 20 Dec 2013 gnutls-serv(1)
All times are GMT -4. The time now is 01:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy