English > en_Linux
How to listen on specic addresses?
(1/1)
Uqbar:
Hi all.
I have installed amule-daemon on mu Ubuntu 16.04.2.
The package version is said to be "2.4.0~git20151120.0023527bc2-1ubuntu1".
In order to have amuled listen only on a specific interface I have manually setup the
--- Code: ---ECAddress=127.0.0.42
--- End code ---
This works as i can check the process is listening only on 127.0.0.42.
But then I have two issues:
* amuleweb doesn't start anymore.
* there's no similar setting for amuleweb so it's listening on all interfaces/IPs.Without that setting, amuleweb is starting normally. With it I cannot see it (with neither "netstat -l" nor "ps ax"), despite the log says:
--- Code: ---Command ''amuleweb' '--amule-config-file=/home/auser/.aMule/amule.conf'' with pid '25155' has finished with status code '0'.
--- End code ---
Surely I am doing something wrong. Any hint?
Then, is there a way to accomplish the task with item no.2 without firewalling?
TALIA!
Uqbar:
UPDATE!
You cannot: it's a bug!
GonoszTopi:
--- Quote from: Uqbar on May 26, 2017, 08:10:01 PM ---amuleweb doesn't start anymore.
--- End quote ---
When you start amuleweb from amule(d) it unconditionally tries to connect to localhost, 127.0.0.1. But since you're accepting connections only from 127.0.0.42 it obviously doesn't work.
I wrote it up to my personal to-do list, but I cannot guarantee it will be fixed by tomorrow :)
Uqbar:
I think you are right: thanks.
As there is too few logging from amuleweb, I had no clue.
For sure amuleweb should connect where the EC* settings say, nowhere else.
Uqbar:
UPDATE + WORKAROUND
On my system I am using now iptables (sw firewall) to make those TCP ports unavailable but loopback.
First, I have checked which actual addresses where in use:
--- Code: ---sudo netstat -tnp | grep -e 4711 -e 4712
--- End code ---
and found that only 127.0.0.1 and 127.0.0.42 where in use, as per my configuration, by amuled and amuleweb.
Then I have run and added to the /etc/rc.local these two lines:
--- Code: ---iptables -A INPUT -d <YOUR_IP_HERE> -p tcp --dport 4711 -j DROP #amuleweb
iptables -A INPUT -d <YOUR_IP_HERE> -p tcp --dport 4712 -j DROP #amuled
--- End code ---
Of course, if you have more than one IP other than the loopback, hen you need to replicate those two lines with the proper extra IP addresses.
Navigation
[0] Message Index
Go to full version