View previous topic :: View next topic |
Author |
Message |
stefanonafets l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/419971626410bbd508e677.gif)
Joined: 10 Feb 2003 Posts: 644
|
Posted: Thu Mar 13, 2003 7:54 pm Post subject: ip masquerading |
|
|
Salve a tutti.
Allora, il problema che ho è che ogni volta che riavvio la LinuxBox, per poter accedere ad internet tramite il pc con su win devo ridare i comandi Code: | #iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE |
e
Code: | echo 1 > /proc/sys/net/ipv4/ip_forward |
Non c'è un modo per automatizzare il processo e fargli compiere queste operazioni in fase di boot?
Grazie... _________________ registered Linux user number #411324
sed 's/ke/che/g'
<The Deployment Slave is initializing> |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
teknux Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Southpark/avatar36.gif)
Joined: 19 Feb 2003 Posts: 517 Location: Rome, IT
|
Posted: Thu Mar 13, 2003 8:28 pm Post subject: |
|
|
è sufficente che tu aggiunga quei comandi (e tutti quelli che vuoi far partire ad ogni boot...) in
/etc/conf.d/local.start
c'è anche un /etc/conf.d/local.stop nel caso tu voglia fermare qualcosa.
saluti,
tek |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ginko Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/10943389714088c08ad7803.gif)
Joined: 01 May 2002 Posts: 371 Location: nearby my linux laptop
|
Posted: Fri Mar 14, 2003 8:36 am Post subject: |
|
|
Attiva iptables con
Code: | rc-update add iptables default |
dopodiche' configura iptables e salva la tua rulebase sul file
Code: | /var/lib/iptables/rules-save |
mediante il comando
Code: | iptables-save > /var/lib/iptables/rules-save |
Ad ogni reboot, iptables ri-attivera' automaticamente le regole salvate e
l'ip forwarding (vedi /etc/init.d/iptables).
--Gianluca |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
greg_g Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
Joined: 02 Mar 2003 Posts: 180
|
Posted: Fri Mar 14, 2003 7:26 pm Post subject: |
|
|
... e per il forwarding basta modificare l'opzione opportuna
in /etc/sysctl.conf (file che viene letto da uno script nel runlevel boot) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
JuradaXP n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/13119352463e79bc0ca018c.gif)
Joined: 19 Mar 2003 Posts: 16 Location: Jesolo
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|