View previous topic :: View next topic |
Author |
Message |
stefanonafets l33t


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 |
|
 |
teknux Guru


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 |
|
 |
Ginko Guru


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 |
|
 |
greg_g Retired Dev

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 |
|
 |
JuradaXP n00b


Joined: 19 Mar 2003 Posts: 16 Location: Jesolo
|
|
Back to top |
|
 |
|