Tim Rodriguez
2002-12-01 01:50:34 UTC
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
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