Developing Client server application using INDY - delphi

I am currently developing a client server app , but i want to clarify some information about the following.
What must be my idtcpserver binding IP adress (127.0.0.1 ,192.168.1.1 or my public IP)
I checked it using IPconfig it replied me 192.168.1.1 ;but i have connected to the internet using my home adsl router(single port).
I have assigned my client application with
idtcpclient.host := my public IP address
the application is working well when i assign both with 127.0.0.1 // as both are in the local machine
How to make my application work over the internet.When i try to connect over the internet the client is replying me
Socket error #10061 connection refused.
but my kaspersky network monitor is showing that my port is opened my myapplication (I set it to 6000)
original project
sourceforge

You don't need to create a binding on the server machine. Just assign the default port. At run time, a single binding will be created with that port and a blank IP address.
When you connect to your network from the outside using the external IP address, you are actually connecting to your router (or other hardware). You should be able to tell your router that traffic received on a specific port will be directed to an internal IP address.
I have a handful of servers running on my internal network, and this is how I make them available from the Internet.
You mention that you have a DLink router. If it works the same as mine:
Using your favourite web browser, open the router's settings page.
I think the default address is http://192.168.0.1. User name is "admin" with no password.
Click the Advanced tab and select Virtual Server.
The virtual server settings are pretty straight forward.

Related

Find the IP of an internet host using its MAC adress only

I would like to avoid VPN for permanent connection to a remote host, I would like to replace the static IP address with the MAC address, and using the MAC to find the IP.
You can't. The MAC is used for local routing, not global routing. A MAC on a remote network is hidden by a gateway on the remote side. You can't even tell which gateway is doing that. It's even possible that the IP address doesn't have a MAC address behind it. This was the case for instance with dial-up lines; there would be a phone number behind it.
This explains why there's no API for this.

Is it possible to monitor the visited websites with each user or IP using Mikrotik device and Freeradius server

I'm using Mikrotik device to make a Hotspot service and using Freeradius running on Centos server ( running on different server ) for AAA ( Authentication , Authorization and Accounting )
Now, What i need is to log every single website that certain user visited ( monitoring web surfing )
actually, I i don't know if it is possible with Freeradius or using Mikrotik services
This can be done with a web proxy.
You can use either integrated mikrotik proxy feature by enabling proxy (https://wiki.mikrotik.com/wiki/Manual:IP/Proxy#Transparent_proxy_configuration_example) and log proxy activity (https://wiki.mikrotik.com/wiki/Manual:System/Log#Example:Webproxy_logging).
You can use also proxy program like Squid on your CentOS box to save CPU and storage resources on your Mikrotik router.
Another option, you can also use a program called "conntrack" on your CentOS to, as the name says, keep track of all connections. This can include any connections, not only HTTP requests. Of course, all internet traffic must pass through the CentOS box.

How do i find the ip address of a server in a homegroup

I have a number of devices connected to a server. When it restarts the ip address might change. How would the remaining devices find the new address?
I want to automate the process since I want to distribute the software and there won't be any network administrator.
I found solutions like configuring a DHCP server or manually configuring the router, but it won't possible to manually configure the routers of the devices that would use the software.
What you could do is following :-
Assign static IP-Address to the server; it could be done by adding a reservation for server's IP-Address based on the MAC address of the server in the router. Check your router manual for how to add IP-Address reservation for a designated MAC-Address.
Once server has got a static IP-Address, your work would be so easy to achieve. You either need to ensure that the clients make an entry of the server's hostname and the corresponding static IP into the client's host name OR if you've an adhoc connection(WiFi/Bluetooth), it would do that automatically without your intervention.
That's it, you have a static IP-Address for your server and you have mapping of server's IP-Address and hostname into each client's etc/hosts file(not needed for adhoc connections as explained above).

How to get local ip address from ios device in asp.net c#?

Can i get a local ipaddress of ios device from asp.net? I want to get a ios device ip address and want to store into database.
You can obtain the IP addresss using ifaddrs. Full example e.g. here: iPhone/iPad/OSX: How to get my IP address programmatically?
And than you can use web service (asmx or WCF) to send the IP address to your ASP.NET based service. An example e.g. here:
http://highoncoding.com/Articles/809_Consuming__NET_Web_Services_in_an_iOS_Application.aspx
UDPATE:
Based on your clarification, this is what you might need:
Request.ServerVariables["REMOTE_ADDR"], //the address, but if you are behind e.g. badly configured load balancer the IP will be not of the origin of the request
Request.ServerVariables["HTTP_X_FORWARDED_FOR"] //if you are behind proxy or load balancer, this is where the original IP address should be

Blackberry Push notification : Java.io.IOException:Network operation(Subscribe)failed. Make sure that Content Provider Url is accessible

I am working on blackberry Push Notification and facing a big issue while registering from the device. I'm getting the Exception:
Java.io.IOException:Network operation(Subscribe)failed. Make sure that Content Provider Url is accessible..
I go through this guide and set up all things according to it.
However I am unable to register. My tomcat server is running and I can access content provider URL from my computer and the same from device's browser.
PC URL is: https:/loaclhost:8443/sample-push-initiator
I changed local host to IP address of my Computer. and can access it over WiFi.
Please help me regarding this.
Your push initiator URL must be publicly accessible from the internet to be accessible from your device. Using localhost or any local IP address (e.g. 192.168.0.2) won't work.
You'll have to set up your router to forward traffic on port 8443 to your PC's local IP.
You should ensure that this URL is accessible from your blackberry normal web browser (not the hotspot browser) before trying with the sample push app.

Resources