Bonjour,
Voici mon projet :
mettre mon orange pi en ethernet(eth0) -> avoir un vpn (tun0) -> faire un ad hoc pour que mes appareils en wifi se connect dessus.
Pour la connexion sur un vpn (openvpn) : fonctionnelle
Je bloque sur le ad hoc quand je veux me connecter, ça me fait "connexion en cours ..." et ça se deconnect.
voici les commandes que je fais pour configurer le mode ad hoc :
ifconfig wlxc8be19d6360a down
iwconfig wlxc8be19d6360a mode ad-hoc
iwconfig wlxc8be19d6360a channel auto
iwconfig wlxc8be19d6360a key 1234567890
iwconfig wlxc8be19d6360a essid mon_wifi
ifconfig wlxc8be19d6360a up
ifconfig wlxc8be19d6360a 172.31.1.1 netmask 255.255.255.0
dnsmasq -i wlxc8be19d6360a -F 172.31.1.50,172.31.1.100 -O option:router,172.31.1.1
sysctl -w net.ipv4.ip_forward=1
iptables -A FORWARD -i wlxc8be19d6360a -s 172.31.1.0/255.255.255.0 -o tun0 -j ACCEPT
iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
voici ce que Ifconfig & Iwconfig me disent :
root@Orangepi:~# iwconfig wlxc8be19d6360a
wlxc8be19d6360a IEEE 802.11bg ESSID:"mon_wifi" Nickname:"rtl_wifi"
Mode:Ad-Hoc Frequency:2.422 GHz Cell: 02:11:87:66:0B:02
Bit Rate:54 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:1234-5678-90 Security mode:open
Power Management:off
Link Quality=100/100 Signal level=94/100 Noise level=0/100
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
root@Orangepi:~# ifconfig wlxc8be19d6360a
wlxc8be19d6360a: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.31.1.1 netmask 255.255.0.0 broadcast 172.31.255.255
inet6 fe80::bcc4:6068:4efe:46c8 prefixlen 64 scopeid 0x20<link>
ether c8:be:19:d6:36:0a txqueuelen 1000 (Ethernet)
RX packets 224 bytes 39565 (38.6 KiB)
RX errors 0 dropped 12 overruns 0 frame 0
TX packets 629 bytes 256527 (250.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Bien cordialement Johan
Dernière modification par johan77 (09-02-2019 09:19:10)