SNAT static vs. dynamic ip = pppoe
Ok, I have loaded roaming peguin pppoe client for my DSL connection and I need to alter my rules script to allow connections out the ppp0 interface that rp-pppoe client creates. If my understanding is correct, (please feel free to make constructive suggestions), if you have a dynamically assigned ip address, it is better to use MASQUERADE.
Example: iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
This due to the fact that MASQUERADE will obtain the presently assigned dynamic ip address and assigning it to every single packet going out through ppp0....correct? So no matter what ip address is dynamically assigned by my ISP I will always have a connection to the Internet via MASQUERADE...correct?
If I have a static ip address, (and I do), it is better to use SNAT.
Example: iptables -t nat -A POSTROUTING -o ppp0 -j SNAT --to 1.2.3.4
This will make matters more efficient due to the fact that SNAT automatically assigns the --to 1.2.3.4 ip address to every packet without the overhead of having to obtained the ip address. Is this correct so far?
Now, I have had some problems with my ISP in then getting it right with my account statically assigning my ip address...I have had the experience where my ip address has changed in the past, as if I my account where set for dynamically assigned ip address. I have called then and they "supposedly" have fixed this. My ip address has recently stayed static.
To avoid future inabilities to access the Internet and knowing that my ISP has, in the past, bungle my account; would it be a safer bet to use MASQUERADE even though at the moment my ip address seems to be staying static? They may have finally gotten my account right.
Your comments, construtive suggestions, remarks and confirmations about my thinking will be gratefully appreciated, as always.
Sincerely,
Tim Rodriguez
Network Security Student
Quoted 5 lines · Tim Rodriguez
Ok, I have loaded roaming peguin pppoe client for my DSL connection and I need to alter my rules script to allow connections out the ppp0 interface that rp-pppoe client creates. If my understanding is correct, (please feel free to make constructive suggestions), if you have a dynamically assigned ip address, it is better to use MASQUERADE.
Necessary, if the IP changes very often.
Quoted 7 lines
Example: iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
This due to the fact that MASQUERADE will obtain the presently assigned dynamic ip address and assigning it to every single packet going out through ppp0....correct? So no matter what ip address is dynamically assigned by my ISP I will always have a connection to the Internet via MASQUERADE...correct?
That's the idea.
Quoted 7 lines
If I have a static ip address, (and I do), it is better to use SNAT.
Example: iptables -t nat -A POSTROUTING -o ppp0 -j SNAT --to 1.2.3.4
This will make matters more efficient due to the fact that SNAT automatically assigns the --to 1.2.3.4 ip address to every packet without the overhead of having to obtained the ip address. Is this correct so far?
Precisely.
Quoted 10 lines
Now, I have had some problems with my ISP in then getting it right with my account statically assigning my ip address...I have had the experience where my ip address has changed in the past, as if I my account where set for dynamically assigned ip address. I have called then and they "supposedly" have fixed this. My ip address has recently stayed static.
To avoid future inabilities to access the Internet and knowing that my ISP has, in the past, bungle my account; would it be a safer bet to use MASQUERADE even though at the moment my ip address seems to be staying static? They may have finally gotten my account right.
Safer, probably, but likely unnecessary. I am technically on a dynamic IP with my ADSL, although it rarely changes unless the ADSL modem is reset. I have found the following to work well for me, and probably would be quite suitable for your situation.
# PPPIP set to the IP of EXTIF, assumes it remains unchanged until
# reboot (or firewall restart) but is not truly static PPPIP=$(/sbin/ifconfig "$EXTIF" | grep inet | cut -d":" -f 2 | cut -d" " -f 1) # If PPPIP is different from the IP in our SNAT, issue warning if !($IPTABLES -t nat -L | grep SNAT | cut -d":" -f 2 | grep -q $PPPIP) then echo "IP has changed to "$PPPIP", Please issue restart." fi
The only part you would need is the PPPIP assignment, which extracts the current IP from "ifconfig ppp0". (EXTIF="ppp0" earlier in my script) The remainder is useful for me because my firewall is a fully parameterized script, so each time I call it (ie service firewall list, or actually "fw list" since I have a shell alias set up) it checks the setting and notifies me if the IP has changed from what my current rules use.
Quoted 6 lines
Your comments, construtive suggestions, remarks and confirmations about my thinking will be gratefully appreciated, as always.
Sincerely,
Tim Rodriguez
Network Security Student
j
Red Hat 8
Hello all,
Hope that everyone had a good
Thanksgiving and weekend. Well I have a question for you guys regarding red hat
8. I have just installed it. I got an alert from the red hat update. Does anyone trust that update program?
Is that the way to update patches and other holes in red hat now?
Can anyone help me out?
Louie
Re: Red Hat 8
What does this have to do with netfilter? suggest subscribing to one of the Red Hat support lists. Having said that see below.
Quoted 8 lines · Louie
Hello all,
Hope that everyone had a good
Thanksgiving and weekend. Well I have a question for you guys regarding red hat
8. I have just installed it. I got an alert from the red hat update. Does anyone trust that update program?
If you trust Red Hat to do the right thing than I suppose you can trust up2date. If you do not than I would suggest you find a different distro. All packages distributed by Red Hat for the production releases are gpg signed. If you trust that the key has not been compromised then all should be ok.
IOW, just how paranoid are you?
Quoted 2 lines
Is that the way to update patches and other holes in red hat now?
It does not install patches. It installs updated rpms. It is one of many ways to keep systems updated. I do not use it personally but a lot of others like it.
Quoted 1 line
Can anyone help me out?
You could help yourself out by doing a little homework and/or asking on the correct mailing list.
Hope this helps,
Signature · 5 lines
.............Tom "Nothing would please me more than being able to [email protected] hire ten programmers and deluge the hobby market with good software." -- Bill Gates 1976 We are still waiting ....
Re: Red Hat 8
Hello all!
I've downloaded RH8 on redhat site but the disk 2 got an error when installing, also the disk can't passed the "disk test" of RH. I already wasted 3 cdr for disc 2.
Anyone know wher to download RH8?
Thanks
----- Original Message -----
From: "Tom Diehl" <[email protected]>
To: "Louie" <[email protected]>
Cc: "iptables-list" <[email protected]>
Sent: Sunday, December 01, 2002 7:27 PM
Subject: Re: Red Hat 8
Quoted 1 line
What does this have to do with netfilter? suggest subscribing to one of
the Red Hat
Quoted 19 lines
support lists. Having said that see below.
Quoted 8 lines · Louie
Hello all,
Hope that everyone had a good Thanksgiving and weekend. Well I have a question for you guys regarding red hat
8. I have just installed it. I got an alert from the red hat update. Does anyone trust that update program?If you trust Red Hat to do the right thing than I suppose you can trust up2date. If you do not than I would suggest you find a different distro. All packages distributed by Red Hat for the production releases are gpg signed. If you trust that the key has not been compromised then all should be ok.
Quoted 7 lines
IOW, just how paranoid are you?
Quoted 2 lines
Is that the way to update patches and other holes in red hat now?
It does not install patches. It installs updated rpms. It is one of many ways to keep systems updated. I do not use it personally but a lot of
others
Quoted 5 lines
like it.
Quoted 1 line
Can anyone help me out?
You could help yourself out by doing a little homework and/or asking on
the
Quoted 11 lines
correct mailing list.
Hope this helps,
--
.............Tom "Nothing would please me more than being able to [email protected] hire ten programmers and deluge the hobby market with good software." -- Bill Gates 1976We are still waiting ....