• [^] # Re: IP passerelle

    Posté par . En réponse au message Résolu_Solved_Routeur OpenWrt: accès internet impossible. Évalué à 1. Dernière modification le 23 février 2015 à 22:13.

    Effectivement, l'ip de la gateway coté machine client est bien celle du lan, erreur grossière réparée ce matin...
    J'ai fait des modifications sur la route, ajouté un SNAT, les DNS du serveur Orange, ajusté à la MTU à 1492 (1500 n'a jamais fonctionné chez moi). Fait étrange, à partir de l'interface graphique Luci de Openwrt, ping, traceroute et nslookup fonctionnent normalement alors qu'aucune connection à la livebox ou au web n'est possible depuis une console ou le navigateur.
    Bizarre encore: je peux me connecter à l'interface de Openwrt coté wan http://192.168.1.19/cgi-bin/luci/

    Les nouveaux paramètres:

    #Openwrt /etc/config/network
    config interface 'loopback'
     option ifname 'lo'
     option proto 'static'
     option ipaddr '127.0.0.1'
     option netmask '255.0.0.0'
    config globals 'globals'
    config interface 'lan'
     option force_link '1'
     option type 'bridge'
     option proto 'static'
     option netmask '255.255.255.0'
     option ip6assign '60'
     option ipaddr '192.168.2.4'
     option _orig_ifname 'eth0.1 radio0.network1 radio1.network1'
     option _orig_bridge 'true'
     option ifname 'eth0.1 eth0.2'
     option mtu '1492'
    config interface 'wan'
     option _orig_ifname 'eth0.2'
     option _orig_bridge 'false'
     option proto 'static'
     option netmask '255.255.255.0'
     option ifname 'eth0.2'
     option gateway '192.168.1.1'
     option ipaddr '192.168.1.19'
     option mtu '1492'
     option dns '81.253.149.9 80.10.246.1'
    config switch
     option name 'switch0'
     option reset '1'
     option enable_vlan '1'
    config switch_vlan
     option device 'switch0'
     option vlan '1'
     option ports '0t 1t 2 3 4 5'
     option vid '1'
    config switch_vlan
     option device 'switch0'
     option vlan '2'
     option ports '0t 1'
     option vid '2'
    config route
     option interface 'wan'
     option gateway '192.168.1.1'
     option target '0.0.0.0'
     option netmask '0.0.0.0'
    #Openwrt /etc/config/firewall
    config rule
     option target 'ACCEPT'
     option src 'wan'
     option proto 'tcp'
     option dest_port '80'
     option name 'http'
     option dest 'lan'
     option src_port '80'
     option dest_ip '192.168.2.4'
    config rule
     option target 'ACCEPT'
     option src 'wan'
     option proto 'tcp'
     option dest_port '443'
     option name 'https'
     option dest 'lan'
     option src_port '443'
     option dest_ip '192.168.2.4'
    config rule
     option name 'Allow-Ping'
     option src 'wan'
     option proto 'icmp'
     option icmp_type 'echo-request'
     option family 'ipv4'
     option target 'ACCEPT'
     option enabled '0'
    config defaults
     option syn_flood '1'
     option input 'ACCEPT'
     option output 'ACCEPT'
     option forward 'ACCEPT'
    config zone
     option name 'lan'
     option input 'ACCEPT'
     option output 'ACCEPT'
     option mtu_fix '1'
     option network 'lan'
     option masq '1'
     option forward 'ACCEPT'
    config zone
     option name 'wan'
     option output 'ACCEPT'
     option mtu_fix '1'
     option input 'ACCEPT'
     option forward 'ACCEPT'
     option network 'wan'
    config include
     option path '/etc/firewall.user'
    config redirect
     option target 'DNAT'
     option src 'wan'
     option proto 'tcp'
     option dest_port '80'
     option name 'http'
     option src_port '80'
     option dest 'lan'
     option dest_ip '192.168.2.4'
    config redirect
     option target 'DNAT'
     option src 'wan'
     option proto 'tcp'
     option dest_port '443'
     option name 'https'
     option src_port '443'
     option dest 'lan'
     option dest_ip '192.168.2.4'
    config redirect
     option target 'DNAT'
     option dest 'lan'
     option proto 'tcp'
     option dest_port '2049'
     option name 'NFS'
     option src 'lan'
     option src_port '2049'
     option dest_ip '192.168.2.4'
    config forwarding
     option dest 'lan'
     option src 'wan'
    config forwarding
     option dest 'wan'
     option src 'lan'
    config redirect
     option target 'SNAT'
     option src 'lan'
     option dest 'wan'
     option proto 'all'
     option name 'subnetpriv'
     option src_ip '192.168.2.4'
     option dest_ip '192.168.1.19'
     option src_dip '192.168.1.19'
     option src_port '1-65000'
     option dest_port '1-65000'