(no commit message)
authortuxcrafter <tuxcrafter@web>
Sun, 4 Jul 2010 12:09:02 +0000 (14:09 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 4 Jul 2010 12:09:02 +0000 (14:09 +0200)
examples/simple-bridging-with-dhcp-server-side.mdwn

index 85ae7ac..f1bd3f2 100644 (file)
@@ -99,7 +99,7 @@
 >       bridge_ports tun1
 >       bridge_maxwait 1
 >       bridge_fd 2.5
->       post-up /bin/echo 1 > /proc/sys/net/ipv4/conf/br0/proxy_arp
+>       post-up /bin/echo 1 > /proc/sys/net/ipv4/conf/br0/proxy_arp # optional
 >     
 >     cat /etc/network/interfaces
 >     
 >     
 >     echo '#!/bin/sh
 >     ifconfig $INTERFACE 0.0.0.0
+>     route add -net 192.168.30.0 netmask 255.255.255.0 br0 # optional subnet
 >     brctl addif br0 $INTERFACE' | tee /etc/tinc/powercraft01/tinc-up
 >     
 >     cat /etc/tinc/powercraft01/tinc-up
 >     
 >     echo '#!/bin/sh
 >     brctl delif br0 $INTERFACE
+>     route del -net 192.168.30.0 netmask 255.255.255.0 br0 # optional subnet
 >     ifconfig $INTERFACE down' | tee /etc/tinc/powercraft01/tinc-down
 >     
 >     cat /etc/tinc/powercraft01/tinc-down
 >     cat /var/lib/dhcp3/dhcpd.leases
 >     
 >     #-----------------------------------------------------------------------
+>     
+>     # optional
+>     export LAN01=vlan2
+>     export VPN02=br0
+>     # /sbin/iptables --append FORWARD --in-interface br0 --out-interface vlan2 --jump ACCEPT
+>     /sbin/iptables --append FORWARD --in-interface ${VPN02} --source 192.168.3.150 --destination 192.168.2.206 --out-interface ${LAN01} --jump ACCEPT
+>     
+>     #-----------------------------------------------------------------------