Flashphoner to listen only in local IP

mbedial

Member
"Hi, we are trying to configure Flashphoner to only listen on our local network. Our plan is to connect to wss via HAPROXY, which is in the same local network as our WCS.

The current configuration of our flashphoner.properties file is as follows:

ip = 10.121.120.26

ip_local = 10.121.120.26

We are using WCS as a SIP gateway for our Asterisk VoIP server.

outbound_proxy = 127.0.0.1

outbound_port = 5060

However, after restarting, the process is still listening at 0.0.0.0. What are we missing? Thank you!"
 

Max

Administrator
Staff member
Good day.
Try to set as follows:
Code:
https.address=10.121.120.26
ws.address=10.121.120.26
wss.address=10.121.120.26
client_mode=true
 

mbedial

Member
Thanks a lot for your quick answer.
We've just tried with this config:

https.address=10.121.120.26
ws.address=10.121.120.26
wss.address=10.121.120.26
client_mode=true

outbound_proxy =127.0.0.1
outbound_port =5060

#webrtc ports range
media_port_from =31001
media_port_to =32000

#codecs
codecs =opus,alaw,ulaw,g729,speex16,g722,mpeg4-generic,telephone-event,h264,vp8,flv,mpv
codecs_exclude_sip =mpeg4-generic,flv,mpv
codecs_exclude_streaming =flv,telephone-event
codecs_exclude_sip_rtmp =opus,g729,g722,mpeg4-generic,vp8,mpv

#websocket ports
ws.port =9080
wss.port =9443

ws.map_custom_headers=true
ws.ip_forward_header=X-Client-IP


log4j.rootLogger=info, stdout, fAppender

And after restart:

tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 2264604/java
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 2264604/java

So, with these changes it seems that it doesn't consider the ports I config, but the defaults...
 

Max

Administrator
Staff member
Hello

Websocket configuration:

8080
Code:
ws.address  = 0.0.0.0
8443
Code:
wss.address = 0.0.0.0
 

mbedial

Member
I think I may have explained it incorrectly earlier.
I want WCS to only listen in 10.121.120.26 and wss port 9443 and ws port 98080, How should I configure the system?
I configured it as I pasted before:

https.address=10.121.120.26
ws.address=10.121.120.26
wss.address=10.121.120.26
client_mode=true

#websocket ports
ws.port =9080
wss.port =9443

However when I check it, I have this

netstat -tulpn | grep java
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 2268239/java
tcp 0 0 0.0.0.0:8081 0.0.0.0:* LISTEN 2268239/java
tcp 0 0 0.0.0.0:8082 0.0.0.0:* LISTEN 2268239/java
tcp 0 0 0.0.0.0:3478 0.0.0.0:* LISTEN 2268239/java
tcp 0 0 0.0.0.0:554 0.0.0.0:* LISTEN 2268239/java
tcp 0 0 0.0.0.0:8888 0.0.0.0:* LISTEN 2268239/java
tcp 0 0 127.0.0.1:50999 0.0.0.0:* LISTEN 2268239/java
tcp 0 0 0.0.0.0:843 0.0.0.0:* LISTEN 2268239/java
tcp 0 0 0.0.0.0:9091 0.0.0.0:* LISTEN 2268239/java
tcp 0 0 0.0.0.0:36995 0.0.0.0:* LISTEN 2268239/java
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 2268239/java
tcp 0 0 0.0.0.0:8444 0.0.0.0:* LISTEN 2268239/java
tcp 0 0 0.0.0.0:8445 0.0.0.0:* LISTEN 2268239/java
tcp 0 0 127.0.0.1:45953 0.0.0.0:* LISTEN 2268239/java
tcp 0 0 0.0.0.0:1935 0.0.0.0:* LISTEN 2268239/java
tcp 0 0 0.0.0.0:2001 0.0.0.0:* LISTEN 2268239/java
tcp 0 0 0.0.0.0:2002 0.0.0.0:* LISTEN 2268239/java
tcp 0 0 0.0.0.0:1098 0.0.0.0:* LISTEN 2268239/java
udp 0 0 0.0.0.0:1935 0.0.0.0:* 2268239/java

We want WCS only to listen in the local IP and no in all the interfaces

BR
Mario
 

Max

Administrator
Staff member
However when I check it, I have this
This is a default WCS bindings and ports. You should restart WCS after changing the IP and listening address options
Code:
systemctl restart webcallserver
 

mbedial

Member
Thanks a lot.
We always restart the service after any config change:

root@jj:/# grep ws /usr/local/FlashphonerWebCallServer/conf/flashphoner.properties
ws.address=10.121.120.26
wss.address=10.121.120.26
ws.port =9080
wss.port =9443
ws.map_custom_headers=true
ws.ip_forward_header=X-Client-IProot@jj:/# systemctl restart webcallserverroot@jj:/# netstat -tulpn | grep 9443root@jj:/#root@jj:/# netstat -tulpn | grep 8080
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 3622378/java
 

Max

Administrator
Staff member
Please check if there is no other WCS processes already running:
Code:
ps aux | grep java
If not, please provide SSH access to the server using this form.
 

mbedial

Member
Thanks,
I've just sent the form with the access.
Please let me know when ou have finished in order to remove the temporal ssh account
 

Max

Administrator
Staff member
Unfortunately the instance is not available with credentials you've sent:
1683947639794.png

Please provide a correct credentials.
 

Max

Administrator
Staff member
You should uncomment ip and ip_local settings
1684038963101.png

Also, remove the logging setting from flashphoner.properties
1684039241609.png

In this case WCS should start and listen the ports you've set
 

mbedial

Member
Thnaks a lot!
It seems that now is OK.

tcp 0 0 10.121.120.26:9443 0.0.0.0:* LISTEN 3923212/java
r# netstat -tulpn | grep 9080
tcp 0 0 10.121.120.26:9080 0.0.0.0:* LISTEN 3923212/java
 
Top