[WLANware] VPN - 2 seperate WLAN interfaces

knowitall at fastmail.net knowitall at fastmail.net
Tue Jan 15 15:00:18 CET 2013


Hallo Manuel,

danke erst einmal für die schnelle Antwort. Ich werde mein Problem mal
genauer beschreiben.

Ich wohne im Uni-Wohnheim und mir werden Ports gesperrt das ich nicht
Online Games zocken kann daher habe ich mir eine VPN-Verbindung mit mein
Heimrechner eingerichtet, das läuft soweit. Ich benötige aber öfters
Zugriff auf das Hochschule Netzwerk um Arbeitsproben abzugeben. Momentan
steck ich dann den Router raus und verbinde mich direkt. Ich möchte zwei
Wifi aufmachen (was schon geht) und eines soll eine VPN(wifi-iface
network wifi) haben die andere nicht (wifi-iface network lan). Ich habe
schon an der /etc/config/firewall rum geschraubt bislang ohne erfolg.

Ich hoffe alles ist verständlich

cheers,
Peter

Der Router TP-Link WR1043ND ist wie folgt eingerichtet

/etc/config/wireless
config 'wifi-device' 'wlan0'
	option 'type' 'mac80211'
	option 'macaddr' 'f8:d1:11:3a:b5:fc'
	option 'hwmode' '11ng'
	option 'htmode' 'HT20'
	list 'ht_capab' 'SHORT-GI-40'
	list 'ht_capab' 'DSSS_CCK-40'
	option 'channel' 'auto'
	option 'txpower' '27'
	option 'country' 'DE'

config 'wifi-iface'
	option 'device' 'wlan0'
	option 'mode' 'ap'
	option 'network' 'wifi'
	option 'ssid' 'wifiVPN'
	option 'encryption' 'psk2'
	option 'hidden' '0'
	option 'key' '*****'
	option 'disabled' '0'

config 'wifi-iface'
	option 'device' 'wlan0'
	option 'mode' 'ap'
	option 'network' 'lan'
	option 'ssid' 'wifiUNI'
	option 'encryption' 'psk2'
	option 'hidden' '0'
	option 'key' '*****'
	option 'disabled' '0'

/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 'interface' 'lan'
	option 'ifname' 'eth0.1'
	option 'type' 'bridge'
	option 'proto' 'static'
	option 'ipaddr' '192.168.2.1'
	option 'netmask' '255.255.255.0'

config 'interface' 'wan'
	option 'ifname' 'eth0.2'
	option 'proto' 'dhcp'

config 'interface' 'wifi'
	option 'ifname' 'eth0.3'
	option 'type' 'bridge'
	option 'proto' 'static'
	option 'ipaddr' '10.0.1.1'
	option 'netmask' '255.255.255.0'
	
config 'interface' 'vpn'
	option 'ifname' 'tun0'
	option 'defaultroute' '0'
	option 'peerdns' '0'
	option 'proto' 'none'

config 'switch'
	option 'name' 'rtl8366rb'
	option 'reset' '1'
	option 'enable_vlan' '1'

config 'switch_vlan'
	option 'device' 'rtl8366rb'
	option 'vlan' '1'
	option 'ports' '1 2 3 4 5t'

config 'switch_vlan'
	option 'device' 'rtl8366rb'
	option 'vlan' '2'
	option 'ports' '0 5t'

/etc/config/firewall
config 'defaults'
	option 'syn_flood' '1'
	option 'input' 'ACCEPT'
	option 'output' 'ACCEPT'
	option 'forward' 'REJECT'
	option 'drop_invalid' '1'

config 'zone'
	option 'name' 'lan'
	option 'network' 'lan'
	option 'input' 'ACCEPT'
	option 'output' 'ACCEPT'
	option 'forward' 'REJECT'

config 'zone'
	option 'name' 'wan'
	option 'network' 'wan'
	option 'input' 'REJECT'
	option 'output' 'ACCEPT'
	option 'forward' 'REJECT'
	option 'masq' '1'
	option 'mtu_fix' '1'

config 'zone'
	option 'name' 'vpn'
	option 'input' 'ACCEPT'
	option 'output' 'ACCEPT'
	option 'forward' 'ACCEPT'
	option 'masq' '1'
	option 'network' 'vpn'

config 'rule'
	option 'name' 'Allow-DHCP-Renew'
	option 'src' 'wan'
	option 'proto' 'udp'
	option 'dest_port' '68'
	option 'target' 'ACCEPT'
	option 'family' 'ipv4'

config 'rule'
	option 'name' 'Allow-Ping'
	option 'src' 'wan'
	option 'proto' 'icmp'
	option 'icmp_type' 'echo-request'
	option 'family' 'ipv4'
	option 'target' 'ACCEPT'

config 'rule'
	option 'name' 'Allow-DHCPv6'
	option 'src' 'wan'
	option 'proto' 'udp'
	option 'src_ip' 'fe80::/10'
	option 'src_port' '547'
	option 'dest_ip' 'fe80::/10'
	option 'dest_port' '546'
	option 'family' 'ipv6'
	option 'target' 'ACCEPT'

config 'rule'
	option 'name' 'Allow-ICMPv6-Input'
	option 'src' 'wan'
	option 'proto' 'icmp'
	list 'icmp_type' 'echo-request'
	list 'icmp_type' 'destination-unreachable'
	list 'icmp_type' 'packet-too-big'
	list 'icmp_type' 'time-exceeded'
	list 'icmp_type' 'bad-header'
	list 'icmp_type' 'unknown-header-type'
	list 'icmp_type' 'router-solicitation'
	list 'icmp_type' 'neighbour-solicitation'
	option 'limit' '1000/sec'
	option 'family' 'ipv6'
	option 'target' 'ACCEPT'

config 'rule'
	option 'name' 'Allow-ICMPv6-Forward'
	option 'src' 'wan'
	option 'dest' '*'
	option 'proto' 'icmp'
	list 'icmp_type' 'echo-request'
	list 'icmp_type' 'destination-unreachable'
	list 'icmp_type' 'packet-too-big'
	list 'icmp_type' 'time-exceeded'
	list 'icmp_type' 'bad-header'
	list 'icmp_type' 'unknown-header-type'
	option 'limit' '1000/sec'
	option 'family' 'ipv6'
	option 'target' 'ACCEPT'

config 'include'
	option 'path' '/etc/firewall.user'

config 'zone'
	option 'input' 'ACCEPT'
	option 'forward' 'REJECT'
	option 'output' 'ACCEPT'
	option 'name' 'wifi'
	option 'network' 'wifi'

config 'forwarding'
	option 'dest' 'vpn'
	option 'src' 'wifi'

config 'forwarding'
	option 'dest' 'wan'
	option 'src' 'wifi'

config 'forwarding'
	option 'dest' 'wifi'
	option 'src' 'vpn'

config 'forwarding'
	option 'dest' 'vpn'
	option 'src' 'lan'

config 'forwarding'
	option 'dest' 'wan'
	option 'src' 'lan'

config 'forwarding'
	option 'dest' 'lan'
	option 'src' 'vpn'


On Sun, Jan 13, 2013, at 01:58 AM, Manuel Munz wrote:
> On 13.01.2013 02:14, knowitall at fastmail.net wrote:
> > hallo listenleute,
> > 
> > habe einen 1043nd mit OpenWRT laufen aber will nicht meinen ganzen
> > traffic über den VPN laufen lassen. 
> > habe eine skizze [1] gemacht, wie ich's mir vorstelle, weiß aber nicht
> > wie ich das so konfiguriert bekomme. habt ihr ideen? 
> > 
> > cheers,
> > peter
> > 
> > [1] http://postimage.org/image/46lhrdrdn/
> > 
> 
> Hi,
> 
> bei der Hardware und Treiberkombination (ath9k) kannst du das so machen.
> Du musst ein neues wireless interface konfigurieren und das dem Netzwerk
> lan hinzufügen.
> 
> Da gibts zwei Wege:
> 
> 1.) über die shell:
> 
> editiere /etc/config/wireless und füge dort folgendes hinzu, ob radio0
> passt bei dir musst noch überprüfen (siehe beim wifi_device):
> 
> config wifi-iface 'radio0_iface_lan'
> 	option device 'radio0'
> 	option mode 'ap'
> 	option encryption 'none'
> 	option network 'lan'
> 	option ssid 'Privates LAN'
> 
> Wahrscheinlich willst dann auch noch WPA aktivieren. Danach nen reboot.
> 
> 2.) Über LuCI
> 
> - Admin->Netzwerk->Drahtlos
> - Hinzufügen
> - Sachen ausfüllen, wichtig ist bei Netzwerk lan zu wählen
> - Dann Speichern & Anwenden
> 
> Grüße,
> 
> Manuel
> 
> 
> 
> _______________________________________________
> WLANware mailing list
> WLANware at freifunk.net
> Abonnement abbestellen? ->
> http://lists.freifunk.net/mailman/listinfo/wlanware-freifunk.net
> 
> Weitere Infos zu den freifunk.net Mailinglisten und zur An- und Abmeldung
> unter http://freifunk.net/mailinglisten
> Email had 1 attachment:
> + signature.asc
>   1k (application/pgp-signature)

-- 
http://www.fastmail.fm - A fast, anti-spam email service.



More information about the WLANware mailing list