Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IPTables and FTP with redhat 9.0 1

Status
Not open for further replies.
Jun 11, 2003
88
US
i have a redhat 9.0 machine that is set up as a FTP server. i set the IP tables accordingly with regards to the static IP address (both local and the one from the router)

here is my question. I could potentially have a client that wants to use an FTP site, but would be grabbing IP addresses dynamically and not statically. is there a simple way can IPtables be used to resolve to a DNS name instead of a numeric address? that way even if the IP address changes it will still point to the right place.

david
 
Explain...

Are you saying your potential client wants to access your FTP server from a dynamic IP address and you've locked down the port to block all but specific IP addresses?

Or are you saying they're going to want to use a setup like yours to run an FTP server, but have a dynamic IP address?


'use an FTP site' is very ambiguous and 'point to the right place' doesn't actually make sense in either of the possible scenarios I've proposed above.
 
ok let me see if i can clarify.

right now i have the public IP address i got off the router fowarded to the local static private IP address on the linux box.


instead of having people type in all the time
ftp://68.x.x.x to get to the site is it possible to use the IPtables to take a DNS name like ftp://myfileserver and use that to resolve to the IP address, even if it changes. or would i have to update the IPtables if my dynamic public address changes regardless?

secondly how would i resolve a static public address to a name like ftp://myfileserver using IPtables?

hope that helps

david
 

For the first part you would need to dynamically update your dns, so you would either have to be in control of your own dns or you would have to use some sort of service like dyndns.net.

For the second part, you only have to resolve the address when you start iptables and install your filters. As long as the 'router' machine stays up it should hang onto the same ip address. That's the way DHCP works. If you do a quick reboot and RFC compliant dhcp server will probably give you the same IP address back, especially if your dhcp client is configured to request it. Since you only start iptables at boot and you only request your dynamic IP address, then do the lookup in your iptables startup script.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top