I've a raspberrypi with pihole and wireguard installed. Pihole works fine, same for wireguard except Signal Messenger for Android. When I'm connected over VPN I always get a timeout.
java.net.ConnectException: Failed to connect to /192.168.210.1 (port 8080) from /10.6.0.2 (port *****) after *****ms: isConnected failed: ETIMEDOUT (Connection timed out) ...
I installed wiregurad with PiVPN script, hence I've a very simple config which looks like this:
[Interface]
PrivateKey = ***
Address = 10.6.0.1/24
ListenPort = ***
[Peer]
PublicKey = ***
PresharedKey ***
AllowedIPs = 10.6.0.2/32
PersistentKeepalive = 25
The configuration on my mobile phone is also pretty straight forward.
My routing table looks like:
default via 192.168.1.1 dev eth0 src 192.168.1.2 metric 202
10.6.0.0/24 dev wg0 proto kernel scope link src 10.6.0.1
192.168.1.0/24 dev eth0 proto dhcp scope link src 192.168.1.2 metric 202
192.168.1.2 is my raspi and also my default DNS. I' don't understand why Signal is trying to connect to 192.168.210.1 and I get this exception only when connected over VPN. Does anyone have an idea? Thanks!
Related
I use this code keystor is .bks file (Android):
secure(KEYSTORE_FILE.getAbsolutePath(), KEYSTORE_PASSWORD,null,null);
get("/hello", (req, res) -> "Hello World");
When i try to access https://192.168.0.24/hello on my browser, i get connexion failed.
Also, i try:
curl -v --tlsv1.2 --tls-max 1.3 https://192.168.0.24/hello
Trying 192.168.0.24:443...
* TCP_NODELAY set
* connect to 192.168.0.24 port 443 failed: Connexion refusée
* Failed to connect to 192.168.0.24 port 443: Connexion refusée
* Closing connection 0
curl: (7) Failed to connect to 192.168.0.24 port 443: Connexion refusée
Do you know what is the problem please?
Without secure, it's works fine with http protocol.
Thank you.
TLS only works with domain names, not IP addresses or localhost.
Use the hostname in your certificate.
I have installed ejabberd in windows 10 and I want my android application(running in android device in same network) to login to the locally hosted ejabberd server.
Note: I could access ejabberd admin portal in port 5280 ie. [192.168.x.x:5280/admin] from the android device but couldn't connect to port 5222.
Code for XMPPTCPConnection :
XMPPTCPConnectionConfiguration.Builder builder = XMPPTCPConnectionConfiguration.builder();
builder.setXmppDomain("192.168.x.x");
builder.setDebuggerEnabled(true);
builder.setUsernameAndPassword("username", "password");
builder.setResource("smack");
XMPPTCPConnection mConnection = new XMPPTCPConnection(builder.build());
I get the following error:
I/DNSUtil: Could not resolve DNS SRV resource records for _xmpp-client._tcp.192.168.x.x. Consider adding those. W/System.err: org.jivesoftware.smack.SmackException$ConnectionException: The following addresses failed: '_xmpp-client._tcp.192.168.x.x:5222' failed because: de.measite.minidns.hla.ResolutionUnsuccessfulException: Asking for _xmpp-client._tcp.192.168.x.x. IN SRV yielded an error response NX_DOMAIN, '192.168.x.x:5222' failed because: de.measite.minidns.hla.ResolutionUnsuccessfulException: Asking for 192.168.x.x. IN A yielded an error response NX_DOMAIN, '192.168.x.x:5222' failed because: de.measite.minidns.hla.ResolutionUnsuccessfulException: Asking for 192.168.x.x. IN AAAA yielded an error response NX_DOMAIN
I have also modified the ejabberd.yml file in order to listen to all the ipv4 ports as described in ejabberd documentation
listen:
-
port: 5222
ip: "0.0.0.0"
module: ejabberd_c2s
starttls: true
certfile: 'CERTFILE'
protocol_options: 'TLSOPTS'
max_stanza_size: 65536
shaper: c2s_shaper
access: c2s
-
port: 5269
ip: "0.0.0.0"
module: ejabberd_s2s_in
max_stanza_size: 131072
shaper: s2s_shaper
-
port: 5280
ip: "0.0.0.0"
module: ejabberd_http
request_handlers:
"/websocket": ejabberd_http_ws
"/api": mod_http_api
web_admin: true
http_bind: true
## register: true
captcha: false
Any work around is highly appreciated.
I am using Openfire server its admin panel is running on my localhost. When i try to connect to it using android smack library on localhost, port 5222 it gives me Connection Error.
The credentials i am using is...
private static final String DOMAIN = "127.0.0.1";
private static final String USERNAME = "admin";
private static final String PASSWORD = "admin";
The Exception I am getting is...
SMACKException: The following addresses failed: '127.0.0.1:5223' failed because java.net.ConnectException: failed to connect to /127.0.0.1 (port 5223) after 30000ms: isConnected failed: ECONNREFUSED (Connection refused)
However I have just installed openfire and then set it up. I can see the Admin panel on http://localhost:9090/ and can login using username and password as admin.
I tried google it but nothing seems like working for me. So can anyone help me to get it working? I am pretty new to openfire server so have very little knowledge about it.
Thanks in Advance.
Are you sure you connecting to port 5222?
SMACKException: The following addresses failed: '127.0.0.1:5223' failed because java.net.ConnectException: failed to connect to /127.0.0.1 (port 5223) after 30000ms: isConnected failed: ECONNREFUSED (Connection refused)
Your stack point to 5223 (SSL) port.
Also, you have to use your public IP instead of localhost.
synchronized void configureConnection() {
XMPPTCPConnectionConfiguration.Builder config = XMPPTCPConnectionConfiguration
.builder();
config.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);
config.setServiceName(HOST);
config.setHost(HOST);
config.setPort(PORT);
config.setDebuggerEnabled(true);
XMPPTCPConnection.setUseStreamManagementResumptiodDefault(true);
XMPPTCPConnection.setUseStreamManagementDefault(true);
connection = new XMPPTCPConnection(config.build());
connection.addSyncStanzaListener(this, new StanzaTypeFilter(org.jivesoftware.smack.packet.Message.class));
}
please check:
Did you open 5222 and 5223 port on your openfire server? I've got "Can not connect" error like you, everythings is okay, but I didn't open 5222 and 5223 port to allow connect.
Check again the security configuration on your server to set the right config on client
config.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);
hi i have implemented xmpp and below github link have example.Try to follow up thing.
https://github.com/saveendhiman/XMPPSample_Studio
here, you are missing according to me.You have to mention port number.Specified for xmpp is 5222.
ConnectionConfiguration config = new ConnectionConfiguration(HOST1,
5222);
SmackConfiguration.DEBUG_ENABLED = true;
SASLAuthentication.supportSASLMechanism("MD5", 0);
System.setProperty("smack.debugEnabled", "true");
config.setCompressionEnabled(false);
config.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);
config.setReconnectionAllowed(true);
config.setSendPresence(true);
config.setRosterLoadedAtLogin(true);
Try this,Still you got any error or exception then tell me.
Thank you hope this will help you.
I want to use rabbitMqtt and I programming my client by android.but in android code i have MqttException for this line of code mqttClient.connect(generateClientId(), cleanStart, keepAliveSeconds);
when I get cause of this exception, that return this error:
java.net.ConnectException: failed to connect to /192.168.0.86 (port 1883) after 1200000ms: isConnected failed: ECONNREFUSED (Connection refused)
I guessed this problem comes from that perhaps my RabbitMqtt broker not listen to port 1883. My rabbitMqtt is running and I performed the server but I can't see any port by name of 1883 in Resource Monitor. please help me
I am using Odroid A device, which have bcm4239 wifi hardware(according to Hardkernel's spec. i don't know how to check this programatically). i have attached the log when i try to enable the wifi using
mWifiManager.setWifiEnabled(true).
I want to know the meaning of the log, especially "E/WifiHW(1175): FIRMWARE_LOADER faile" message.
Thank you!!
Below is the error log!!
I/WifiHW(1175): /sys/devices/platform/odroid-sysfs/wifi_enable : write success (on = 1)
I/WifiHW(1175): /sys/devices/platform/odroid-sysfs/wifi_nrst : write success (on = 1)
E/WifiHW(1175): FIRMWARE_LOADER faile
D/SoftapController(1079): Softap fwReload - Ok
D/NetworkManagementService(1175): rsp <213 (mac address here) 0.0.0.0 0 [up broadcast running multicast]>
D/CommandListener(1079): Setting iface cfg
D/CommandListener(1079): Trying to bring down wlan0
D/NetworkManagementService(1175): flags <[up broadcast running multicast]>
D/CommandListener(1079): broadcast flag ignored
E/WifiStateMachine(1175): Unable to change interface settings: java.lang.IllegalStateException: Unable to communicate with native daemon to interface setcfg - com.android.server.NativeDaemonConnectorException: Cmd {interface setcfg wlan0 0.0.0.0 0 [down broadcast running multicast]} failed with code 501 : {Flag unsupported}
E/wpa_supplicant(4058): Line 58: WPA-PSK accepted for key management, but no PSK configured.
E/wpa_supplicant(4058): Line 58: failed to parse network block.
I/wpa_supplicant(4058): rfkill: Cannot open RFKILL control device
E/WifiHW(1175): 'GET_NETWORK 0 bssid' fail.
...
I am using ICS 4.0.4..
Thanks in advance