Création de Brunec en tant que passerelle xbox-wifi.
IBM Thinkpad 240
carte réseau pcmcia (uniquement pour l'install) :
- Ositech Trumpcard : 4 of diamonds
- MAC: 00:C0:E3:00:65:2A
- id: 0x0140:0x0000
Disque : 6.5Go
Installation de debian Etch via le réseau : 4 disquettes :
- boot
- root
- net-drivers 1
- net-drivers 2 : les drivers pour la carte pcmcia sont la !
Une seule partition
- hda1 : /
- hda5 : swap (~ 329Mo)
Users :
- root / ********
- jjl / ********
Paquets :
- ordinateur portable
- système standard
Nettoyage
aptitude remove --purge bluetooth
Install
aptitude install openssh-server ifrename bmon shorewall

eth0 : interface filaire
- Belkin F5D5050 : usb2eth
- MAC: 00:05:1B:00:5E:49
- id: 0x050D:0x0121
eth1 : interface wifi Besoin d'un firmware dans /lib/firmware : voir doc ubuntu, ou bien sur penfret : /home/jjl/data/documents/Documentation/Wifi_Livebox/CartePCMCIA_Sagem/
/etc/network/interfaces :
auto eth0
iface eth0 inet static
address 192.168.2.240
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
auto eth1
iface eth1 inet static
address 192.168.1.55
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
wireless-rate auto
wireless-essid XXXXXX
wireless-key restricted XXXXXXXX...
/etc/iftab :
# Nommage fixe des interfaces reseau
eth0 mac 00:05:1B:00:5E:49
eth1 mac 00:03:C9:73:0F:5F
Voir la doc en fr
voir la doc debian :
zcat /usr/share/doc/shorewall/README.Debian.gz|less
Configurer :
cd /usr/share/doc/shorewall/examples/two-interfaces
cp zones /etc/shorewall/
zcat policy.gz > /etc/shorewall/policy
zcat interfaces.gz > /etc/shorewall/interfaces
vi /etc/shorewall/interfaces
#ZONE INTERFACE BROADCAST OPTIONS
net eth1 detect tcpflags,routefilter,nosmurfs,logmartians
loc eth0 detect tcpflags,detectnets,nosmurfs
zcat masq.gz > /etc/shorewall/masq
vi /etc/shorewall/masq
#INTERFACE SUBNET ADDRESS PROTO PORT(S) IPSEC
eth1 eth0
zcat rules.gz > /etc/shorewall/rules
vi /etc/shorewall/rules
# Accept SSH connections from the internet network for administration
SSH/ACCEPT net $FW
# Accept Ping from the "bad" net zone
Ping/ACCEPT net $FW
# Forward http from net to xbox
HTTP/DNAT net loc:192.168.2.66
# forward ftp from net to xbox
FTP/DNAT net loc:192.168.2.66
vi /etc/shorewall/shorewall.conf
IP_FORWARDING=On
Démarrer le firwall au boot dans /etc/default/shorewall :
startup=1
aptitude install samba smbclient
--> workgroup : XBOX
dans /etc/samba/smb.conf, commenter les partages d'imprimantes inutiles et modifier ainsi :
guest account = nobody
[data]
path=/data
public = yes
browseable = yes
writeable = no
create mask = 0644
directory mask = 0755
/etc/shorewall/rules :
# accept samba from local
SMB/ACCEPT loc $FW
Attention il n'y a pas de protection !
|