Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a pc that shares internet connection to another device, which is configurated to access it's manufacturers website and get any updates available. Note that this internet sharing is made through my ethernet port and that the device isn't configurable to access any other website.

Are there any methods to get all the data that is passing through my ethernet port and then connect my pc to the device and reproduce exactly what the website sent to the device when I recorded it like making my pc the website?

An Example:

  • Device x Website

    • device : get the website ID
    • site : 0000000XX0Xx00xx0
    • device : get date and time
    • site : 12:30.31-12-2011GMT-4
    • device : download updates if available
    • site : pkg2.iso pkg3.tar
  • Device x PC

    • device : get the website ID
    • pc : 0000000XX0Xx00xx0
    • device : get date and time
    • pc : 12:30.31-12-2011GMT-4
    • device : download updates if available
    • pc : pkg2.iso pkg3.tar

So just reproduce the same thing the website sent to the device, but it'll be my pc that will be sending the data.

Thanks for the attention, Rodrigo.

share|improve this question
up vote 2 down vote accepted

Sure you can.

Step 1) Get the full site using wget ( see ).

2 ) Install and run a webserver like Apache ( )

3) Put the files downloaded from step 1 in /var/www

4) Ask your friend to access the site from your IP address through a browser. To get the IP address, use the connection information option in your network manager ( top right of your screen ) or use the command ifconfig

share|improve this answer
You cannot reproduce a non static website, one that contain some sort of server-side scripting or programming, like ASP, JSP, cgi or similar. – enzotib Oct 22 '11 at 5:44
Regarding what @enzotib said, yes we need to know what sort of website it is. Or we can simply make a cache instead? We can also have a local DNS server pointing to the server on the network instead of fourth point. – Oxwivi Oct 22 '11 at 6:31
You seem to have updated your question, Rodrigo. The solution that you want is possibly different from the one I suggested. Some man-in-the-middle stuff might help, but am not sure. You would probably need to run dns, and use Apache's proxypass module to mirror the manufacturer site. Oh, or you could probably just use some tool that listens on your Ethernet port in promiscuous mode. Don't know of any such tools, though. Some expert could probably help – Anirudh Oct 24 '11 at 8:57
Thank you all for the help, but I gave up on doing this, I found a program called Wireshark, to listen to my Ethernet port, how ever it's not easy to mirror the data collected. I think that it's perfectly possible with some efforts, but I won't keep trying to do this because I have other priorities at the moment. Thank you for the attention! – Rodrigo Martins Nov 2 '11 at 23:49

If the website you are trying to 'copy' is doing any dynamic processing on the server before rendering the HTML, you will not be able to accurately copy it. Without access to the back-end code, the best you would be able to do is to make a static snapshot of that site that would always return the same html response.

share|improve this answer
Perfect, I think I didn't expressed my case very well, but I don't need to have all the behavior of the website, re-read my question now and tell me if it's possible to be done. – Rodrigo Martins Oct 22 '11 at 17:40
a static snapshot may do what you want then - Anirudh's answer would get you most of the way there. – ImaginaryRobots Oct 22 '11 at 17:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.