Sponsored Content
Top Forums Web Development Two public ip for server, how to block a port for ip2 but not for ip1 Post 302967695 by baris35 on Friday 26th of February 2016 12:08:47 PM
Old 02-26-2016
Two public ip for server, how to block a port for ip2 but not for ip1

Hello,
I am not sure that it's possible to set a server for explained below scenario:

I have ordered a second ip for my streaming server. Both ip addresses are set and well responding to my ping requests. LAMP is installed into server.
Assume that port 15678 is running for nginx. Admin port is also the same, 15678. I am able to login admin panel when I enter below links:

Code:
http://server_ip1:15678
http://server_ip2:15678

admin page:
Code:
http://server_ip1:15678/admin/login.php

live stream line format is:
Code:
http://server_ip2:15678/live/user/pass/stream_nr?token=****

Is it possible to set nginx accepting connection requests to port 15678 for only ip1 or ip2, not both of them ?

I am planning to connect to admin page via only ip1, ip2 will not accept connection requests.

thanks in advance
Boris
 

9 More Discussions You Might Find Interesting

1. IP Networking

block telnet to specific port

Hello All I am running redhat linux 7.2 and would like to know how i can block telnetting to a specified port . say for example i would like to block telnet acesses to port 80. regards Xiamin (5 Replies)
Discussion started by: xiamin
5 Replies

2. IP Networking

How to know port is block..

My server is running on a port 16386, in the case when this port is blocked by some other application ( anti virus etc. ) or firewall then how do i know it's block? Is bind will return any specific error in this case. I have to know is it blocked or not? (2 Replies)
Discussion started by: Saurabh78
2 Replies

3. IP Networking

How to block a port

Hi, i faced a problem, where i have to block a port, therefore nobody used it, evenwith SO_REUSEADDR flag. How can i achive it. (4 Replies)
Discussion started by: Saurabh78
4 Replies

4. UNIX for Dummies Questions & Answers

How do I set the public keys up correctly for a migration from an HP-UNIX server to I

I am getting the error message "Permission denied (publickey). lost connection" when I attempt to do an scp migration. I know how to generate the public keys in both IIS and UNIX, and I believe they are both suppose to have the same public key - but where are they each suppose to be stored (I... (1 Reply)
Discussion started by: whs2k
1 Replies

5. Linux

using firewall to block port

Hi, I will like to allow access to the mysql port (3306) to certain IP address. All other IP's should be automatically blocked. What is the best way to do this? (8 Replies)
Discussion started by: shantanuo
8 Replies

6. Shell Programming and Scripting

Generate Public Key when the server is not ssh enabled

I am writing a script that needs to access various servers some of which are not ssh enabled. In order to access the ssh enabled servers I am using the following command to generate the public key : ssh-keygen -t rsa Is there a similar command for the other servers as well. If I try to use... (1 Reply)
Discussion started by: ravneet123
1 Replies

7. AIX

Installing DSA public key in Unix AIX server

Hi, A VMS server want to use SFTP to transfer files to our Unix server. We received their public key. Below is the process we followed to install this public key in our unix server. 1. Go to $HOME/.ssh 2. cat public_key_vms_server >> authorized_keys2 3. Ensure this folder and file has the... (1 Reply)
Discussion started by: devina
1 Replies

8. Linux

Generate public key to connect from one ftp server to other server

How to generate public key to connect from one ftp server to other server to use in scripting. (0 Replies)
Discussion started by: sridhardwh
0 Replies

9. UNIX for Advanced & Expert Users

Public key to connect from one ftp server to other server

How to generate public key to connect from one ftp server to other server to use in scripting. (1 Reply)
Discussion started by: sridhardwh
1 Replies
libzeep(3)							    subroutine								libzeep(3)

NAME
libzeep - A C++ library for XML parsing, XPath, SOAP servers and web apps SYNOPSIS
#include <zeep/server.hpp> class my_server : public zeep::server { public: my_server(const char* addr, short port); void sum(int a, int b, int& c) { c = a + b; } }; my_server::my_server(const char* addr, short port) : zeep::server("http//www.acme.org/...", addr, port) { const char kSumParameterNames[] = { "a", "b", "c" }; register_action("sum", this, &my_server::sum, kSumParameterNames); } ... int main() { my_server server("0.0.0.0", 10333); boost::thread t(boost::bind(&my_server::run, &server)); // and wait for a signal to stop using e.g. sigwait(3) ... } NOTE
See HTML pages for more up-to-date documentation. E.g. at http://www.cmbi.ru.nl/libzeep/doc DESCRIPTION
Using libzeep you can create a SOAP server by deriving from zeep::server. In the constructor of your server, you call the base class con- structor with three arguments: ns, a namespace for your SOAP server, address, the address to listen to, usually "0.0.0.0" to listen to all available addresses. And port, the port number to bind to. SOAP actions are simply members of the server object and are registered using the register_action member function of the zeep::server base class. After initializing the server object, the run member is called and the server then starts listening to the address and port speci- fied. The resulting web service application will process incoming request. There are three kinds of requests, the server can return an automati- cally generated WSDL, it can process standard SOAP message send in SOAP envelopes and it can handle REST style requests which are mapped to corresponding SOAP messages internally. The signature of the registered actions are used to generate all the code needed to serialize and deserialize SOAP envelopes and to create a corresponding WSDL file. The signature can be as simple as the example above but can also be as complex as in this one: void myAction( const std::vector<MyStructIn>& input, MyStructOut& output); In order to make this work, you have to notify the library of the mapping of your structure type to a name using the macro SOAP_XML_SET_STRUCT_NAME like this: SOAP_XML_SET_STRUCT_NAME(MyStructIn); SOAP_XML_SET_STRUCT_NAME(MyStructOut); Next to this, you have to provide a way to serialize and deserialize your structure. For this, libzeep uses the same mechanism as the Boost::serialize library, which means you have to add a templated member function called serialize to your structure. The result will look like this: struct MyStructIn { string myField1; int myField2; template<class Archive> void serialize(Archive& ar, const unsigned int version) { ar & BOOST_SERIALIZATION_NVP(myField1) & BOOST_SERIALIZATION_NVP(myField2); } }; Similarly you can use enum's in an action signature or as structure member variables. Again we need to tell the library the type name for the enum and the possible enum values. We do this using the SOAP_XML_ADD_ENUM macro, like this: enum MyEnum { "one", "two" }; SOAP_XML_ADD_ENUM(myEnum, one); SOAP_XML_ADD_ENUM(myEnum, two); As shown above, you can also use std::vector containers in the signature of actions. Support for other STL containers is not implemented yet. If the address used by clients of your server is different from the address of your local machine (which can happen if you're behind a reverse proxy e.g.) you can specify the location using the set_location member function of zeep::server. The specified address will then be used in the WSDL file. BUGS
This documentation is seriously out of date. Look at the HTML version for more up-to-date documentation, you can find it at /usr/share/doc/libzeep-dev/html or at http://www.cmbi.ru.nl/libzeep/ Undoubtedly libzeep will contain bugs. One of the more obvious one is the missing support for signatures using STL containers other than std::vector. version 2.9 12-jan-2009 libzeep(3)
All times are GMT -4. The time now is 01:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy