- Posts: 123
- Thank you received: 0
configuring PAT on linux using IPtables
- cybersorcerer
- Topic Author
- Offline
- Senior Member
Less
More
19 years 5 months ago #8611
by cybersorcerer
"He who breaks something to find out what it is, has left the path of wisdom."
Gandalf the Grey
configuring PAT on linux using IPtables was created by cybersorcerer
Im setting up a small home network for a friend and am having trouble configuring iptables for PAT. SNAT or DNAT is not an option because he has to many computers and only one public ip address to forward on. I would like to know the commands issued to set up the firewall ruleset for PAT. Ive already googled for a tutorial specific to PAT and I've found nothing. Thanks!
"He who breaks something to find out what it is, has left the path of wisdom."
Gandalf the Grey
- cybersorcerer
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 123
- Thank you received: 0
19 years 5 months ago #8726
by cybersorcerer
"He who breaks something to find out what it is, has left the path of wisdom."
Gandalf the Grey
Replied by cybersorcerer on topic Re: configuring PAT on linux using IPtables
Well, my problem lies with the documentation of IP tables. It covers dynamic NAT and static NAT wonderfully, but I could not glean one syntax example when it came to port address translation. I know it can do it, I just need to know either WHERE to find the documentation on it or hear from someone who was able to pull it off themselves. I don't have the time to sit around at this guys house and play with it. When I go over there, I need to know exactly what I'm doing. (he is a good friend of my family and is paying me to do this, so I'd rather not waste his money) This post has been on the forum for a while, so if anybody here tried to help me out, they were probably just as successful as I was when it came to searching for documentation.
"He who breaks something to find out what it is, has left the path of wisdom."
Gandalf the Grey
19 years 5 months ago #8727
by nske
Replied by nske on topic Re: configuring PAT on linux using IPtables
You should search for IP Masquerading instead, since that's how it is called in IPtables
Still, I don't see why you can not use SNAT (Source NAT, not to be mistaken with Static NAT) instead. The fact that there are many private hosts and only one public address is irrelevant. Masquerade is good just in case you are not routing through an interface with a static IP address.
Besides the official HOWTOs, there are a couple of unofficial tutorials at the documentation section of netfilter.org, that cover exactly how you can use SNAT/Masquerade to do what you want.
Take a look and experiment a bit, if you still have a problem perhaps I can post some couple-of-line examples (it's not anything complicate anyway, I just can't keep my eyes open enough right now (05:51 AM) ).
Still, I don't see why you can not use SNAT (Source NAT, not to be mistaken with Static NAT) instead. The fact that there are many private hosts and only one public address is irrelevant. Masquerade is good just in case you are not routing through an interface with a static IP address.
Besides the official HOWTOs, there are a couple of unofficial tutorials at the documentation section of netfilter.org, that cover exactly how you can use SNAT/Masquerade to do what you want.
Take a look and experiment a bit, if you still have a problem perhaps I can post some couple-of-line examples (it's not anything complicate anyway, I just can't keep my eyes open enough right now (05:51 AM) ).
- cybersorcerer
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 123
- Thank you received: 0
19 years 5 months ago #8728
by cybersorcerer
"He who breaks something to find out what it is, has left the path of wisdom."
Gandalf the Grey
Replied by cybersorcerer on topic Re: configuring PAT on linux using IPtables
Hmm, I'm just used to the concept of PAT from studying cisco curriculum I guess. I've never read about IP masquerading before, so I will have to give it a look. Thanks again nske!
"He who breaks something to find out what it is, has left the path of wisdom."
Gandalf the Grey
Time to create page: 0.138 seconds