So, my work has several networks and small business locations all with an internet blocking server. The managers all rotate and want freedom from the server, AKA static IP addresses outside the range of DHCP.
my problem is that they all need access to each others network, so setting up an alternate configuration is not that useful. How would I create an application that will change my users IP Address so that it will match their static IP at the location they changed it too?
This is just their internal IP address on their local machine, and each location's network has a static ip waiting for them. Just have to change their IP Address.
Is there a batch file command that can help achieve this? if not maybe writing a script or going into a larger application?
Doing this on the machine itself will be difficult. It needs to be able to recognise each network, and what will it do when connecting to an unknown network like a home network or a hotspot?
I think it would be better to let the DHCP server hand out static addresses from outside the normal dynamic address pool. That way everything keeps working automatically while also giving static addresses to the machines.
I know this is not a real answer to your question, but I hope this gives you an alternative.
Related
I'm building a scraper, and in order to not get banned, I have to make my requests from different IP addresses. Right now I'm doing that with a VPN, but it has several issues.
As I was reading about the topic, everybody was advising the methods I currently use, but those have their own problems.
I noticed that connecting to the same network from different devices gives different IP address. Furthermore, the same device connected to the same network, through WiFi, or through LAN gives different IP address. I'm not too experienced in networks, and don't know if those different addresses are really different, or will reveal that the requests are coming from the same network, but may be a good idea.
And if it is, how can I take advantage of it? Is there a way to programmatically create "fake devices" from the same device, getting different IP addresses? (I'm thinking about VMs or something)
Your public IP address is the one allocated to you (or to a group of Internet users you belong to) by your Internet provider.
On your side of your Internet box, the IP addresses are local addresses. Those local addresses cannot be seen from the outside. So you can change your local IP address as much as you want, the outside world will see you with the same IP.
Your solution could be to rent a server on the cloud and run your scraper on it.
I'm quite new to this world and I do not have a lot of experience with raspberry PI nor with networking, and I have a doubt:
I am supposed to set a static IP to a raspberry device: ok, easy, lots of tutorials out there. The purpose is: Access a site that is on the rasp, via a network (no internet needed), like you do with your router when you configure it.
HOWEVER, this raspberry will be sent to many different places (imagine it's like a group of friends, each week it will be at one's house. They do not know how to program or set things up or even access the rasp). Therefore.. different networks.
The doubt is: Would a static IP still work in that case? Or is it restrained to one's network DHCP?
If it does not work, any ideas on how can I make it work? I'd like to access a html file hosted on the raspberry, but as its IP changes and suppose I don't know what it is, how can I access this html from my computer, both being connected on the same network?
A static IP is restricted to one network, which means you can just simply set a static IP on each network via the Router-Settings. Or configure it your self with a Bash Script.
A more dynamic way would be to just use the hostname, which leads to an access like this http://yourHostname/yourFile.html than even with a different IP everything is working. This assumes that you're webserver is right configured.
For example an Apache2-Conf with VirtualHost could look like this:
<VirtualHost *:80>
ServerName yourHostname
<VirtualHost>
I would go for a more dynamic solution and avoid using a static IP address, because you don't know which subnets are used in different places. For example a wifi might use 192.168.0.xxx, another one might use 192.168.1.xxx and so on...
Solution: try to use a hostname for your Rpi. You will then access it by using its name and not its IP.
step 1: try to find how to setup your hostname
step 2: you will have to somehow "populate" this hostname to the network. Some use the avahi-daemon for this.
step 3: you might need to install Bonjour to your laptop
More info:
about avahi here: Raspberry Pi not reachable via its hostname in LAN
about Bonjour here:
Accessing Raspberry Web server with a ".local" address?
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)
So for those who knows what bitcoin miner is I got one, for those who don't know what it is they can search to see what i mean.
Anyway as far as I have seen, machine is running and configurable through mikrotik installed on raspberry pi.
And I got it working.
The problem is that machine is located on my friend's house, and I need access to the machine from time to time. So far I have made redirect on router so machine is accessible to outside world.
But I can access it only if I know what is ip address of my friend internet. But as he have dynamic ip address, the address is changing from time to time, and I can't access the machine unless he tells me the new address.
What are the possible ways to track dynamic ip address and know what is the address when it's changed so I can access machine any time?
You can access your external ip address formatted as simple text from http://wtfismyip.com/text. You can write a shell script to 'wget' the address and 'mail' it to you. The 'crond' on your raspberry pi can then regularly execute the script.
I'm currently revising for an exam and I'm stuck on a question which is:
"Explain the static and dynamic host configuration approaches."
I'm unsure if the answer is correct but what I've write is this:
static host configuration are hard-coded addresses that will only work on one specific network segment, which is intended for stationary computers
dynamic host configurations work best with portable computers like laptops that move between network segments.
that's my answer, could anyone help me to understand if this is correct or not?
You are correct about the difference. But there s a lot more than what you have stated.
DHC : Used to configure IP addresses automatically to the systems without any intervention of network administrator.
For Eg. When you register for a new internet connection, your ISP(network administrator, in this case) will provide you access to the DHCP server which ll allot you the IP address on the runtime.
To prevent the same IP address being assigned to two different computers
Also the main use is, ISP s will have a range of IP addresses with them. You ll be assigned any of their IPs dynamically by DHCP Server when your lease time expires for a particular IP that have been assigned earlier
SHC : Used to manually configure the IP addresses to systems.
When you knew how many systems are going to be present exactly inside the network
And when you want to uniquely identify a system in the ntwk using its IP address
For Eg. When you configure LAN in your house, between, say, around 4 computers. You will know exactly the number of systems in the group. So you don't have to allot a DHCP Server to allot the IP addresses for these 4 systems. YOu manually configure them
Hope that helps :)