Skip to contentSkip to conversation

FORWARD to a dynamica ip address (ADSL)

DISCUSSION Jonathan X Peers 3 participants 3 messages Aug 17, 2005

lore
Share & tools
lore
#0 lore raw

Hi all

how would a forward to add dynamic ipaddress (how would i tell iptables about the new number, what can I use)

can IPTABLES forward to a host name

Thank You
Jonathan X Peers

______________________________________
XamimeLT - installed on mailserver for domain @nobarrier.co.za Queries to: [email protected]

#1 lore raw
Quoted 5 lines · Jonathan X Peers

Hi all

how would a forward to add dynamic ipaddress (how would i tell iptables about the new number, what can I use)

can IPTABLES forward to a host name

You have to use a variable and a script with grep-command. In the case of adsl you have to act the script shortly after connection or in the case of ipdelivery to services via dhcp a shortly after the adress-refreshprocess defined in the dhcp-service.

Regards,
Ruprecht

------------------------------------------------------------------------------------------
Ruprecht Helms IT-Service & Softwareentwicklung

Tel./Fax +49[0]7621 16 99 16
Web: htp://www.rheyn.de

#2 lore raw
In reply to Jonathan X Peers
Quoted 2 lines

how would a forward to add dynamic ipaddress (how would i tell iptables about the new number, what can I use)

I would recommend that you have your forward rule in a sub-chain of it's own. This way you could write a fairly simple external daemon (shell script) that could flush the sub-chain and insert the new rule. Or if you are really paranoid (not to mention the fact that there is DNS cache timeouts, if you are updating the pointer the old pointer is likely no longer valid, etc) you could insert the new pointer rule at the top of the sub-chain via "-I <sub-chain-name> 1 ..." and then subsequently delete all remaining rules in that sub-chain as it would be used for just that one rule. This will effectively make it safe for a script to work with the chain with out fear of messing up other things in the firewall.

Quoted 1 line

can IPTABLES forward to a host name

No. IPTables will only forward to an IP as far as I'm aware of.

Grant. . . .