How do I monitor network connections to see what address a certain program is contacting - network-traffic

I made a program many years ago, that connects to a SQL Server database (port 1433), and I no longer have the code for this application, but I need to know whether it is trying to connected to the domain name exampleDomain.com or if it is connecting directly to the IP address, xxx.xxx.xxx.xxx.
I need to find this out because I want to switch hosting providers, but cannot let this application stop working, so I'm not sure if changing the IP Address of the SQL server will affect the program.
Is there a way I can tell what this program is connecting to? The raw IP Address or the domain Name?
thanks.

Use wireshark. http://www.wireshark.org/
It's free, easy to use, and very powerful.
You can monitor all traffic coming out of your PC and you can filter the traffic by type. So first I would look for any DNS communication that has MyDoman.com and then look at TCP connections.

Related

Will DHCP server give me always same IP?

I have question on DHCP server in home router. I have founded, that I have same IP address in my notebook for some time. I don't know, how long it last, but it is probably few weeks at least. Will DHCP server ever change my local IP if i will still connecting to that Wi-Fi?
I am asking, because I am working on home automation system and I don't know if i had to keep care about checking if my devices has same IP...Because there will be server, which will remember IP of its clients (lets say ESP8266 modules). Must I periodically check IP address (in my modules) and send new IP to server (in case of change)? Or DHCP server will not change IP address of my modules, connected to that DHCP server? And what about situation when ESP8266 module will disconnect (lets say it will be off for few days) - is it common to get different or same IP from DHCP after connection again?
Thanks!
Simple solution would be reserving IP address for your ESP8266 modules in your DHCP server that they always receive the same IPs.
With regards to your questions:
My routers DHCP server saves clients and keep information about them unless it is deleted explicitly or number of saved clients gets larger than number of addresses available. It serves always the same IP to saved clients. Obviously it depends on the router and might be different in your case.
I'd not check for IPs manually, I'd rather reserve the IPs for the modules as said above.
If your DHCP server stores client information it will give the same IPs to your modules upon reconnect. Otherwise not it won't be necessary the case.
If you use or consider using MQTT server (my preferred way :) ) for your home automation (it has integration in many systems like e.g. Home Assistant) you won't need to care about IP addresses of your modules at all you'd only need to fix IP of the MQTT server.
Another option can be addressing your modules (or/and server) using host name instead of IPs. If you develop n Arduino this GitHub thread might be helpful.

How to setup SQL Server Express on local network with wireless router

Guidance on how to connect to SQL Server 2012 needed.
I am on Windows 10 Home Edition
I have set up SQL Server Express to allow remote connections on my database machine to serve up data to three client machines.
Firewall has been set for ports - check
Allowed mixed mode logins - check
Setup IPs through SQL Configuration Manager - check
The server is something like 192.168.1.40,1433 and I can login successfully through SQL Server Express on my client machines. I had a long LAN cable running along the floor which is not optimal. So, I went to the store and bought a router so that I could connect wirelessly but have limited experience in networking.
After, installation of the router I can no longer connect to SQL Server. This makes sense since there is another piece of hardware in the chain.
After doing an IP config on the command line I see that the IPV4 address has changed. I assume I am not picking up the private IP address of the router rather than the modem that I was initially connected to.
Should I be port forwarding?
What are my options?
I explored what I thought may be reasonable leads to get this working.
First, I tried to create a virtual server (I also assume this is how to port forward on my particular router). I didn't really know what to put in five fields that were given other than server name and Protocol TCP or if I was on the right track at all.
The other three fields consist of:
External Port, Internal IP, and Internal Port
If this is a reasonable solution can you let me know what to put in these fields and any changes to the SQL Server configuration or firewall might be?
Should I VPN ?
After exploring this option on google I also notice people saying, "set up a VPN is the correct way to go." However, I don't really know how to do this. The only VPNs I know of are external VPN providers. It seems that I would be setting up a VPN server if I am not corrected(maybe on the server computer) and connecting via my client machines.
Any clarification or direction would be greatly appreciated. I am sure I have missed the mark on many things here but still would like to make ground.

connecting to another network present in one network

I have been trying to create a server in one network but the people in another network cant connect to my server? Even though my IP is dynamic (dhcp :yes)
I want to create a server in one network but want to connect people to that server present in another network. I started a server "eg: 103.251.9.85:27015"
even though my IP is dynamic, they can't connect to my server? Help me ...
who ever knows my IP address and port number will connect to my server, but when I am starting a server they cant connect.
Your server needs a DNS record.
DHCP is great for allocating an IP address - but you then have to manually tell everyone what the IP Address is.
You should define your Server in your DHCP configuration, assuming that there is a DNS Server also.
By default the DHCPD informs the DNS Server - assuming they are both under your control.
First ensure that you have network connectivity between the nodes - there can be NATs, Firewalls and a lot of different reasons why you can not connect. My advice for you would be to try and use netcat.
Once you have netcat on your computer - start it in a server mode. Then ask your friend to download netcat on his/her computer and connect to your IP address. If you can establish connection - great. Then make a question regarding your server program. If netcat fails - then there is network connectivity issue and you will find better help for those issues in the power user or network engineering Stack Exchange sites.

How to connect two devices through Wifi without using mDNS?

I have an embedded webserver running on a device. Now I want a smartphone app to connect to the webserver. They are on the same wifi network but they don't know each others IP addresses.
I understand that this problem is often solved by implementing the mDNS protocol on the server. But are there any alternatives? Can the server maybe ask for specific IP address or similar?
If it has to be entirely automated, such that the embedded webserver is discoverable, perhaps scan the entire netblock looking for the correct response "http://[IP_address]/yes-im-the-one" from your embedded webserver?
Although beware, some network monitors may then consider the IP of your smartphone/device that does that scan "dangerous" and cut it off from the network - this is probably only a "big enterprise" problem.
...after you "find" your server, perhaps the application should cache/remember this, so it doesn't have to scan next time.
Other things you could do: give your embedded webserver a static IP on the LAN, either by setting this on the device itself, or via a DHCP reservation from whatever is the local DHCP server on the LAN.
What allot of emended devices do is come delivered with a static LAN IP already set on it, then it's up to the sysadmin to change their computer's IP temporarily to be in the same range, then they can visit the webserver or telnet into the default IP, and change it to what they want (to match their network's IP range)

How do I make my game connect to a server without real IP address?

I'm making an XNA game. When I started, I had a broadband connection with real IP, so I could host servers of any kind without any problem, but now I don't have that connection any more and I want to be able to let players from outside my local network connect to my server again. How do I do that? How do big guys at studios do that?
Cheap option:
Configure your home router (it does have real, but probably dynamic, IP address) to forward connections on some port of your liking to your server on the local network. Read up on Network Address Translation - that's the trick routers use to hide a network behind a single routable IP.
Setup a DDNS account somewhere, so people can find your game server by name instead of changing IP address.
Expensive options:
Buy static IP package from your ISP (not always available).
Deploy your game at a Hosting Service.
Generally there are two ways to connect two clients:
Give each client other client's IP address and let them connect to each other.
Give each client a mid-server's IP address and tunnel the traffic through it.
First way assumes each client has a real IP address and they both can be a server to one another. Second way is for when one or both clients don't have real IP address.

Resources