View previous topic :: View next topic |
Author |
Message |
MoonWalker Guru
Joined: 04 Jul 2002 Posts: 511
|
Posted: Fri Feb 14, 2003 8:45 pm Post subject: simple iptables question |
|
|
Ok this one is very simple an I'm almost ashame I don't have the answer myself, but there is so much other things in my head right now so if someone else can "release" this one for me
I need to set up a simple iptables nat MASQ to give some vmware guestsinternet access. I know I can do this individually for each guest like
Code: | iptables -t nat -A POSTROUTING -s 192.168.0.27 -j MASQUERADE |
but it's kinda tiresome to setup for each host and ip. How can I asign a table for the whole 192.168.0.0 network insted?. 192.168.0.0 don't work, neither seam 192.168.0 do...anyone? _________________ /Joakim
Living on earth is expensive, but it includes a free trip around the sun
every year. |
|
Back to top |
|
|
Larde Guru
Joined: 07 Jun 2002 Posts: 313 Location: Duesseldorf, Germany
|
Posted: Fri Feb 14, 2003 8:56 pm Post subject: |
|
|
If I understand correctly, you are looking for 192.168.0.0/24, your example would be: Code: | iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE |
If you'd need the whole 192.168.x.x network, you'd use 192.168.0.0/16.
Hth,
Larde. _________________ Someday this will be my home... http://moonage.net/
I'll make you a deal
I'll say I came from Earth and my tongue is taped
|
|
Back to top |
|
|
MoonWalker Guru
Joined: 04 Jul 2002 Posts: 511
|
Posted: Fri Feb 14, 2003 9:31 pm Post subject: |
|
|
ahh thanks! I thought it was something with .0\nn but have never really understood that way of structuring the ip's - thanks again. _________________ /Joakim
Living on earth is expensive, but it includes a free trip around the sun
every year. |
|
Back to top |
|
|
|