I'm developing Kaa. i don't understand this part:
$ sudo nano /etc/kaa-node/conf/kaa-node.properties
transport_public_interface=localhost=YOUR_PUBLIC_INTERFACE
the link is :http://kaaproject.github.io/kaa/docs/v0.10.0/Administration-guide/System-installation/Single-node-installation/
how to define YOUR_PUBLIC_INTERFACE ?
You should not define this as a variable. Just replace YOUR_PUBLIC_INTERFACE with the correct interface name.
YOUR_PUBLIC_INTERFACE means the public IP or DNS where the Kaa server runs.
For example the entry in property file will be as follows
transport_public_interface=54.17.30.158
Related
In AzerothCore it's possible to change the port of the worldserver by changing the value of WorldServerPort in worldserver.conf. Then the value in the realm table of the acore_auth database should be updated accordingly.
What about the authserver process? It defaults to 3724. Is it possible to change it? How to then tell the client to connect to a different port?
The client points by default to port 3724 when trying to authenticate (login). That's why this is also the default value for the authserver port.
In order to change this, you have to change the value of RealmServerPort from the authserver.conf
Then the client needs to be aware that it should point to a different port, that should be done by changing the realmlist.wtf file.
For example, let's assume that the value of RealmServerPort has been changed to 4000 and that your realmlist is currently:
set realmlist localhost
then it must be changed to:
set realmlist localhost:4000
Right at the moment I am taking a closer look to the polipo proxy software. I already managed to setup an easy socks5 proxy with basic user authentication.
All it needs to be finished is to change the listening interface from eth0 to ppp0. Sadly polipo documentation doesn't provide any detail about this task.
The operating system is Debian 8 running in Hyper-V.
Can this configuration somehow be accomplished, either through calling parameters or configuration file or even iptables?
In the function create_listener, in file io.c, after line 751, add something like the following:
struct ifreq ifr;
memset(&ifr, 0, sizeof(ifr));
strcpy(ifr.ifr_name, "ppp0");
rc = setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, &ifr, sizeof(ifr));
if(rc < 0) {
done = (*handler)(-errno, NULL, NULL);
assert(done);
return NULL;
}
Note: this doesn't provide a working solution to the question. I looked into something similar, but settled with using a different proxy software. Perhaps this information can help arrive at a working solution.
Some possible solutions I have found are the following:
use network namespaces (unix stackexchange, superuser, igalia blog)
read more in info: info ip-netns
"configure polipo to listen on every interface, then block the requests from
interfaces you do not want with iptables" (archlinux forum)
use a different proxy software, like tinyproxy (archlinux forum)
[unix stackexchange]: https://unix.stackexchange.com/questions/210982
[superuser]: https://superuser.com/questions/241178
I build a custom mininet topology: 2 hosts with 2 switches between them:
Host1====Switch1====Switch2====Host2
After filling the flowtables with ONOS, the setup works fine. But I have trouble with handling packets that are forwarded to the SDN-Controller.
As controller I use my own onos-app.
I tried some pinging and sniffed the interfaces with tcpdump.
When one host pings the other host, the host sends an arp request. This request reaches the other host and it replies. Even the reply reaches correct the ping-host. But then... Nothing happens.
I would expect the first host to send the ping after he had received the correct arp reply. But instead it does absolutely nothing.
This even doesn't work using only one switch.
Why does the ping itself doesn't start?
Have you any idea what I did wrong?
Thank you.
R you using ONOS or RYU? It seems like you are using RYU.
If you are RYU: Do you have controller setup properly. Run the RYU using the provided controller code like simple_switch_13.py. See if that works.
If you are ONOS, have you installed features? Based on this tutorial you shuld install a feature. something like:
onos> feature:install onos-app-fwd
I don't know how you are programming the switches but for both controllers note that you should add flows for both directions.
Also, sometimes the flows have a very short lifetime that by the time packets arrive they are expired.
If none of these helped, could you provide more details.
OK. Problem solved :-D
This is what went wrong:
The onos-core itself places the default rules for ARP, IPv4 and IPv6, that redirect packets to the controller. Even if the onos-core writes such a default rule to the flowtable of the switch , it doesnt mean that all packets reach your app. In my case only the ARP-packets reached my app, not the IPv4-packets. Therefor I must add 3 lines to the "#Activate"-section of my app.
#Activate
public void activate() {
appId = coreService.registerApplication("org.onosproject.ifwd");
packetService.addProcessor(processor, PacketProcessor.ADVISOR_MAX + 2);
//***ADD THESE 3 LINES*********************************************************
TrafficSelector.Builder selector = DefaultTrafficSelector.builder();
selector.matchEthType(Ethernet.TYPE_IPV4);
packetService.requestPackets(selector.build(), PacketPriority.REACTIVE, appId);
//*****************************************************************************
}
I am trying to get Asterisk to allow inbound calls (authed purely on IP) on multiple IPs from the same supplier. The only way that works so far is to create a new sip.conf peer entry for each IP.
ACLs look like they should work, but I cannot work out how to use them properly. That or they don't work as I think they do/should.
For example, if I create the following in my sip.conf (a little stripped down) :
[general]
context=no_default_context_allowed
allowguest=yes
...
[supplier]
type=peer
host=1.1.1.1
context=abc
the calls that arrive from 1.1.1.1 go to the context abc as expected. However, if I have a range of IPs (eg 1.1.1.80/28) I would expect something along these lines to work :
[supplier]
type=peer
host=dynamic
acl=supplier-acl
context=abc
with the acl.conf as :
[supplier-acl]
deny=0.0.0.0/0.0.0.0
permit=1.1.1.80/28
From the Asterisk CLI :
acl show supplier-acl
ACL: supplier-acl
----------------------------------------
0: deny - 0.0.0.0/0.0.0.0
1: allow - 1.1.1.80/255.255.255.240
which looks correct to me, and sip show peers shows A in the ACL column.
In every case, no matter how I try and configure it, the call goes to the default context unless the host contains the precise IP of the inbound call.
I've tried so many config variations I can't honestly remember them all, so what I'm asking is does anyone know how to do this?
EDIT: I'm using Asterisk 13.0.2
ACL restricts the network configuration, but does not identify the host.
You will need a separate peer entry per call origin host to ensure that the calls get to the right context. Just make your [supplier] into a template, and then have several [supplier-srv1], [supplier-srv2] each with host=<specific ip> to distinguish them.
Further Reading
+ https://wiki.asterisk.org/wiki/display/AST/Named+ACLs
+ http://www.voip-info.org/wiki/view/Asterisk+config+sip.conf
acl desighned for something like this
[localext]
type=friend
host=dynamic
secret=supersecret
deny=0.0.0.0/0.0.0.0
permit=192.168.0.1/24
You still need add other mandatory params(minimum realy working is above example)
I have a server with two different network interfaces, each with a different IP address. How can I create a socket so it'll go out a specific IP address?
I'd prefer a python example, but the question is language agnostic, so shoot away.
EDIT: Please don't give me "You can't" as an answer. I mean, it is a computer. I can do anything I like to it, for example - I can programatically disable the one interface I don't want on the fly. I'm looking for something prettier.
You can certainly bind a socket to a specific device.
I don't know how to do it in python, but using the berkeley socket api (in C) you need to call setsockopt(), using the option SO_BINDTODEVICE.
You pass in an interface descriptor, which is of type struct ifreq. Ideally you would get the contents of the interface descriptor by using ioctl(), and requesting SIOCGIFINDEX - passing the name of the interface (eg. eth0) as an argument.
edit: Just did a quick search and found this documentation of the socket methods in python. setsockopt() is amongst them.
Just a little note - what I really needed is to bind to a specific IP, and just for the sake of completeness, the solution is to bind the socket after creation. Source in python:
import socket
s = socket.socket()
s.bind(("127.0.0.1", 0))
s.connect(("321.12.131.432", 80))
import socket
s = socket.socket()
s.bind((get_ip_address('eth0'), 0))
from Quora