server wireles
Inviato: mer 15 dic 2004, 14:28
ciao a tutti ....
<BR>
<BR>o un server ( pentium 1 )slackware 10
<BR>questo server a 2 schedde una mi servve per andare su fastweb e l´altra va sulll´access poin wirels .. solo che non o piu la pallida ideea di come fare...
<BR>
<BR>allora io o installato slaky all minimo ... per motivvi di spazzio...
<BR>
<BR>o messo mano al file rc.inet1.conf
<BR>
<BR># /etc/rc.d/rc.inet1.conf
<BR>#
<BR># This file contains the configuration settings for network interfaces.
<BR># If USE_DHCP[interface] is set to "yes", this overrides any other settings.
<BR># If you don´t have an interface, leave the settings null ("").
<BR>
<BR># Config information for eth0:
<BR>IPADDR[0]=""
<BR>NETMASK[0]=""
<BR>USE_DHCP[0]="yes"
<BR>DHCP_HOSTNAME[0]="fastweb.it"
<BR>
<BR># Config information for eth1:
<BR>IPADDR[1]="192.168.0.2"
<BR>NETMASK[1]="255.255.255.0"
<BR>USE_DHCP[1]=""
<BR>DHCP_HOSTNAME[1]=""
<BR>
<BR># Config information for eth2:
<BR>IPADDR[2]=""
<BR>NETMASK[2]=""
<BR>USE_DHCP[2]=""
<BR>DHCP_HOSTNAME[2]=""
<BR>
<BR># Config information for eth3:
<BR>IPADDR[3]=""
<BR>NETMASK[3]=""
<BR>USE_DHCP[3]=""
<BR>DHCP_HOSTNAME[3]=""
<BR>
<BR># Default gateway IP address:
<BR>GATEWAY=""
<BR>
<BR># Change this to "yes" for debugging output to stdout. Unfortunately,
<BR># /sbin/hotplug seems to disable stdout so you´ll only see debugging output
<BR># when rc.inet1 is called directly.
<BR>DEBUG_ETH_UP="no"
<BR>
<BR>
<BR>
<BR>poi o messo mano al file rc.local .per avviare iptables all boot...
<BR>
<BR>in questo modo...
<BR>
<BR>#!/bin/sh
<BR>#
<BR># /etc/rc.d/rc.local: Local system initialization script.
<BR>#
<BR># Put any local setup commands in here:
<BR>#
<BR>#
<BR>iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.2/24 -j MASQUERADE
<BR>
<BR>
<BR>~
<BR>~
<BR>~
<BR>~
<BR>~
<BR>per vedere se tutto mi accetta la regola di iptablres o fatto
<BR>
<BR> iptables -t nat -L
<BR>Chain PREROUTING (policy ACCEPT)
<BR>target prot opt source destination
<BR>
<BR>Chain POSTROUTING (policy ACCEPT)
<BR>target prot opt source destination
<BR>MASQUERADE all -- 192.168.0.0/24 anywhere
<BR>
<BR>Chain OUTPUT (policy ACCEPT)
<BR>target prot opt source destination
<BR>
<BR>
<BR>poi o dovuto mettere le mani sull file
<BR> /etc/dhcpd.conf
<BR>
<BR>in questo modo....
<BR>
<BR># dhcpd.conf
<BR>#
<BR># Configuration file for ISC dhcpd (see ´man dhcpd.conf´)
<BR>#
<BR>log-facility local7;
<BR># Dchp rota fastweb
<BR>#
<BR>ddns-update-style ad-hoc;
<BR>subnet 192.168.0.0 netmask 255.255.255.0 {
<BR>range 192.168.0.100 192.168.0.149;
<BR>range 192.168.0.200 192.168.0.249;
<BR>#default-lease-time 604800; # una settimana
<BR>#max-lease-time 2592000; # 30 giorni
<BR>option subnet-mask 255.255.255.0;
<BR>option broadcast-address 192.68.0.255;
<BR>option routers 192.168.0.1;
<BR>option domain-name-servers 213.156.54.80;
<BR>option domain-name "fastwebnet.it";
<BR>}
<BR>
<BR>~
<BR>~
<BR>
<BR>
<BR>e fino qui ...sapevvo dove mettere le mani.....
<BR>
<BR>pero io devvo capire come devvo configurare questo file ...
<BR>rc.ip_forward
<BR>
<BR>perche leggendolo non mi e chiaro io sono abituato con knoppix che andando su /etc/network/options
<BR>iposto il file in questo modo...
<BR>
<BR> ip_forward=yes
<BR>spoofprotect=yes
<BR>syncookies=no
<BR>~
<BR>~
<BR>
<BR>
<BR>e percio leggendo il file rc.ip_forward non sappia che fare ..acne perche a me sembra che non possa funzzionare sto file ...perche non fa altro che avviare e stoppare il forward....vi posto lo script...
<BR>
<BR>#!/bin/sh
<BR># /etc/rc.d/rc.ip_forward: start/stop IP packet forwarding
<BR>#
<BR># If you intend to run your Linux box as a router, i.e. as a
<BR># computer that forwards and redistributes network packets, you
<BR># will need to enable IP packet forwarding in your kernel.
<BR>#
<BR># To activate IP packet forwarding at boot time, make this
<BR># script executable: chmod 755 /etc/rc.d/rc.ip_forward
<BR>#
<BR># To disable IP packet forwarding at boot time, make this
<BR># script non-executable: chmod 644 /etc/rc.d/rc.ip_forward
<BR>
<BR># Start IP packet forwarding:
<BR>ip_forward_start() {
<BR> if [ -f /proc/sys/net/ipv4/ip_forward ]; then
<BR> echo "Activating IPv4 packet forwarding."
<BR> echo 1 > /proc/sys/net/ipv4/ip_forward
<BR> fi
<BR> # When using IPv4 packet forwarding, you will also get the
<BR> # rp_filter, which automatically rejects incoming packets if the
<BR> # routing table entry for their source address doesn´t match the
<BR> # network interface they´re arriving on. This has security
<BR> # advantages because it prevents the so-called IP spoofing,
<BR> # however it can pose problems if you use asymmetric routing
<BR> # (packets from you to a host take a different path than packets
<BR> # from that host to you) or if you operate a non-routing host
<BR> # which has several IP addresses on different interfaces. To
<BR> # turn rp_filter off, uncomment the lines below:
<BR> #if [ -r /proc/sys/net/ipv4/conf/all/rp_filter ]; then
<BR> # echo "Disabling rp_filter."
<BR> # echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
<BR> #fi
<BR>}
<BR>
<BR># Stop IP packet forwarding:
<BR>ip_forward_stop() {
<BR> if [ -f /proc/sys/net/ipv4/ip_forward ]; then
<BR> echo "Disabling IPv4 packet forwarding."
<BR> echo 0 > /proc/sys/net/ipv4/ip_forward
<BR> fi
<BR>}
<BR>
<BR># Restart IP packet forwarding:
<BR>ip_forward_restart() {
<BR> ip_forward_stop
<BR> sleep 1
<BR> ip_forward_start
<BR>}
<BR>
<BR>case "$1" in
<BR>´start´)
<BR> ip_forward_start
<BR> ;;
<BR>´stop´)
<BR> ip_forward_stop
<BR> ;;
<BR>´restart´)
<BR> ip_forward_restart
<BR> ;;
<BR>*)
<BR> echo "usage $0 start|stop|restart"
<BR>esac
<BR>
<BR>
<BR>
<BR>be o non so cosa debba fare...
<BR>il mio probblema e che io riesco a vedere il mio server nella rete interna .
<BR>
<BR>il server va su internet ... la rete mi vedee il server lo piga ...solo che o un probblema ...io riesco a pingare solo gli ip ... se voglio andare su http://www.gogle.it
<BR>non ci riesco ...se lo pingo non o risposta ... pero se pingo il suo ip mi risponde.....
<BR>
<BR>che devvo fare ??´ o dimenticato qualcosa ???
<BR>
<BR>dimenticavvo io fino adesso non o usato il access point per il semplice motivvo che devvo risolvere un probblema alla volta ...
<BR>infatti la seconda cosa che chieddo è come faccio una volta che il server funzioni come devve a far funzzionare sto access point???<br>
<BR>
<BR>o un server ( pentium 1 )slackware 10
<BR>questo server a 2 schedde una mi servve per andare su fastweb e l´altra va sulll´access poin wirels .. solo che non o piu la pallida ideea di come fare...
<BR>
<BR>allora io o installato slaky all minimo ... per motivvi di spazzio...
<BR>
<BR>o messo mano al file rc.inet1.conf
<BR>
<BR># /etc/rc.d/rc.inet1.conf
<BR>#
<BR># This file contains the configuration settings for network interfaces.
<BR># If USE_DHCP[interface] is set to "yes", this overrides any other settings.
<BR># If you don´t have an interface, leave the settings null ("").
<BR>
<BR># Config information for eth0:
<BR>IPADDR[0]=""
<BR>NETMASK[0]=""
<BR>USE_DHCP[0]="yes"
<BR>DHCP_HOSTNAME[0]="fastweb.it"
<BR>
<BR># Config information for eth1:
<BR>IPADDR[1]="192.168.0.2"
<BR>NETMASK[1]="255.255.255.0"
<BR>USE_DHCP[1]=""
<BR>DHCP_HOSTNAME[1]=""
<BR>
<BR># Config information for eth2:
<BR>IPADDR[2]=""
<BR>NETMASK[2]=""
<BR>USE_DHCP[2]=""
<BR>DHCP_HOSTNAME[2]=""
<BR>
<BR># Config information for eth3:
<BR>IPADDR[3]=""
<BR>NETMASK[3]=""
<BR>USE_DHCP[3]=""
<BR>DHCP_HOSTNAME[3]=""
<BR>
<BR># Default gateway IP address:
<BR>GATEWAY=""
<BR>
<BR># Change this to "yes" for debugging output to stdout. Unfortunately,
<BR># /sbin/hotplug seems to disable stdout so you´ll only see debugging output
<BR># when rc.inet1 is called directly.
<BR>DEBUG_ETH_UP="no"
<BR>
<BR>
<BR>
<BR>poi o messo mano al file rc.local .per avviare iptables all boot...
<BR>
<BR>in questo modo...
<BR>
<BR>#!/bin/sh
<BR>#
<BR># /etc/rc.d/rc.local: Local system initialization script.
<BR>#
<BR># Put any local setup commands in here:
<BR>#
<BR>#
<BR>iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.2/24 -j MASQUERADE
<BR>
<BR>
<BR>~
<BR>~
<BR>~
<BR>~
<BR>~
<BR>per vedere se tutto mi accetta la regola di iptablres o fatto
<BR>
<BR> iptables -t nat -L
<BR>Chain PREROUTING (policy ACCEPT)
<BR>target prot opt source destination
<BR>
<BR>Chain POSTROUTING (policy ACCEPT)
<BR>target prot opt source destination
<BR>MASQUERADE all -- 192.168.0.0/24 anywhere
<BR>
<BR>Chain OUTPUT (policy ACCEPT)
<BR>target prot opt source destination
<BR>
<BR>
<BR>poi o dovuto mettere le mani sull file
<BR> /etc/dhcpd.conf
<BR>
<BR>in questo modo....
<BR>
<BR># dhcpd.conf
<BR>#
<BR># Configuration file for ISC dhcpd (see ´man dhcpd.conf´)
<BR>#
<BR>log-facility local7;
<BR># Dchp rota fastweb
<BR>#
<BR>ddns-update-style ad-hoc;
<BR>subnet 192.168.0.0 netmask 255.255.255.0 {
<BR>range 192.168.0.100 192.168.0.149;
<BR>range 192.168.0.200 192.168.0.249;
<BR>#default-lease-time 604800; # una settimana
<BR>#max-lease-time 2592000; # 30 giorni
<BR>option subnet-mask 255.255.255.0;
<BR>option broadcast-address 192.68.0.255;
<BR>option routers 192.168.0.1;
<BR>option domain-name-servers 213.156.54.80;
<BR>option domain-name "fastwebnet.it";
<BR>}
<BR>
<BR>~
<BR>~
<BR>
<BR>
<BR>e fino qui ...sapevvo dove mettere le mani.....
<BR>
<BR>pero io devvo capire come devvo configurare questo file ...
<BR>rc.ip_forward
<BR>
<BR>perche leggendolo non mi e chiaro io sono abituato con knoppix che andando su /etc/network/options
<BR>iposto il file in questo modo...
<BR>
<BR> ip_forward=yes
<BR>spoofprotect=yes
<BR>syncookies=no
<BR>~
<BR>~
<BR>
<BR>
<BR>e percio leggendo il file rc.ip_forward non sappia che fare ..acne perche a me sembra che non possa funzzionare sto file ...perche non fa altro che avviare e stoppare il forward....vi posto lo script...
<BR>
<BR>#!/bin/sh
<BR># /etc/rc.d/rc.ip_forward: start/stop IP packet forwarding
<BR>#
<BR># If you intend to run your Linux box as a router, i.e. as a
<BR># computer that forwards and redistributes network packets, you
<BR># will need to enable IP packet forwarding in your kernel.
<BR>#
<BR># To activate IP packet forwarding at boot time, make this
<BR># script executable: chmod 755 /etc/rc.d/rc.ip_forward
<BR>#
<BR># To disable IP packet forwarding at boot time, make this
<BR># script non-executable: chmod 644 /etc/rc.d/rc.ip_forward
<BR>
<BR># Start IP packet forwarding:
<BR>ip_forward_start() {
<BR> if [ -f /proc/sys/net/ipv4/ip_forward ]; then
<BR> echo "Activating IPv4 packet forwarding."
<BR> echo 1 > /proc/sys/net/ipv4/ip_forward
<BR> fi
<BR> # When using IPv4 packet forwarding, you will also get the
<BR> # rp_filter, which automatically rejects incoming packets if the
<BR> # routing table entry for their source address doesn´t match the
<BR> # network interface they´re arriving on. This has security
<BR> # advantages because it prevents the so-called IP spoofing,
<BR> # however it can pose problems if you use asymmetric routing
<BR> # (packets from you to a host take a different path than packets
<BR> # from that host to you) or if you operate a non-routing host
<BR> # which has several IP addresses on different interfaces. To
<BR> # turn rp_filter off, uncomment the lines below:
<BR> #if [ -r /proc/sys/net/ipv4/conf/all/rp_filter ]; then
<BR> # echo "Disabling rp_filter."
<BR> # echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
<BR> #fi
<BR>}
<BR>
<BR># Stop IP packet forwarding:
<BR>ip_forward_stop() {
<BR> if [ -f /proc/sys/net/ipv4/ip_forward ]; then
<BR> echo "Disabling IPv4 packet forwarding."
<BR> echo 0 > /proc/sys/net/ipv4/ip_forward
<BR> fi
<BR>}
<BR>
<BR># Restart IP packet forwarding:
<BR>ip_forward_restart() {
<BR> ip_forward_stop
<BR> sleep 1
<BR> ip_forward_start
<BR>}
<BR>
<BR>case "$1" in
<BR>´start´)
<BR> ip_forward_start
<BR> ;;
<BR>´stop´)
<BR> ip_forward_stop
<BR> ;;
<BR>´restart´)
<BR> ip_forward_restart
<BR> ;;
<BR>*)
<BR> echo "usage $0 start|stop|restart"
<BR>esac
<BR>
<BR>
<BR>
<BR>be o non so cosa debba fare...
<BR>il mio probblema e che io riesco a vedere il mio server nella rete interna .
<BR>
<BR>il server va su internet ... la rete mi vedee il server lo piga ...solo che o un probblema ...io riesco a pingare solo gli ip ... se voglio andare su http://www.gogle.it
<BR>non ci riesco ...se lo pingo non o risposta ... pero se pingo il suo ip mi risponde.....
<BR>
<BR>che devvo fare ??´ o dimenticato qualcosa ???
<BR>
<BR>dimenticavvo io fino adesso non o usato il access point per il semplice motivvo che devvo risolvere un probblema alla volta ...
<BR>infatti la seconda cosa che chieddo è come faccio una volta che il server funzioni come devve a far funzzionare sto access point???<br>