Jump to content

iptables and dynamically assigned IP addresses


sherington
 Share

Recommended Posts

I am pretty much an iptables newbie, so I need a little bit of help... :D

 

I have managed, by scouring various HOWTOs and FAQs, to get a decent iptables ruleset up and running that gives me:

 

1. firewall protection, simply blocks most incoming network traffic,

2. the routing I need to my XBox (for XBox Live!).

3. internet connection sharing via masquerading to another PC on my network

 

I have a very simple network setup with my Linux PC connecting to the internet via ppp, and a network hub connecting the PC, another PC and the XBox. The XBox uses the PC's internet connection. The hub is just a dumb hub with no configuration or routing of its own.

 

All of this works just fine for me, although I have to admit I don't fully understand all of the iptables rules that I've had to create. It works, and I'm happy enough with that.

 

My problem is this, my iptables ruleset currently has a hard-coded static IP address for my internet connection. These rules are used to route traffic from the XBox to the internet and vice versa.

 

At the moment, this is OK. However, I want to upgrade my internet connection to a higher capacity (1Mb from 512Kb) - part of this upgrade will mean that I will have a dynamically assigned IP address from the ISP for the internet connection rather than the static IP I have now.

 

The firewall script and the script(s) that start the internet connection both run automatically when the PC is started up.

 

How do I handle this dynamic IP in my ruleset?

 

Any pointers or help will be gratefully appreciated.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...