Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 167667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:18:57+00:00 2026-05-11T12:18:57+00:00

I admit the linux network system is somewhat foreign to me, I know enough

  • 0

I admit the linux network system is somewhat foreign to me, I know enough of it to configure routes manually and assign a static IP if necessary.

So quick question, in the ifconfig configuration files, is it possible to add a post connect hook to a python script then use a python script to reassign a hostname in /etc/hosts and spawn off a new process to do other things once the hostname has been updated.

This is a ‘fun’ project for me to solve an annoyance in my daily routine. When I boot up my workstation in the morning, the DHCP service assigns it a IP at random. So I usually stop what I’m doing, lookup my new IP, type that IP into my laptop and get synergy running so I can share the two machines. I figure I lose 10-15 minutes a day doing this everyday of the week and I’ve never really messed with linux’s networking system so it would ultimately pan out.

I already figured my python script would have to run as root, therefore I’d store it in /root or somewhere else that’s safe. I found a similar question on stack overflow that pointed me in the direction of http://www.secdev.org/projects/scapy/index.html a raw packet toolset to work with ARP. Editing the host file is a snap… just wondering what possible side effects of trying to put this hook into a core service might cause.

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T12:18:58+00:00Added an answer on May 11, 2026 at 12:18 pm

    Cleanest solution would be to have a DHCP server that exchanges its assignments with a local DNS server. So regardless which IP address your workstation is being assigned to, it is accessible under the same hostname.

    This concept is used in every full-blown windows network as well as in any other well configured network.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a program for Linux that stores its data and settings in the
We're experiencing slightly strange webapp deployment behaviour under Tomcat 5.5.27 on Linux (both on
Let's presuppose that you have R running with root/admin privileges. What R calls do
For some Webhost issues I have to write a file backup/syncronisation tool for a
I'm building a CMS-type webapp that allows users to enter arbitrary-sized blocks of HTML.
Context : This is for a software develop internally and used only by company's
Here's an excerpt from Live HTTP headers, I've replaced several values for anonymity. POST
I use Windows 7. I am working with a project that is using Redmine
I'm just wondering if it's possible, and if so could someone lead me into
We have a web application deployed on a tomcat server. There are certain scheduled

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.