X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=examples%2Fsimple-bridging-with-dhcp-server-side.mdwn;h=f1bd3f2f0439f7c363dd891933927e514f3ebcfb;hb=8dbefd76d70214d371f301dcc85b26fb87c1da95;hp=f63be0fb29521a6ec3eb4847f29689f2931c3792;hpb=207b37b1d5a26d9b30d5e776dd27d096a285a87b;p=wiki diff --git a/examples/simple-bridging-with-dhcp-server-side.mdwn b/examples/simple-bridging-with-dhcp-server-side.mdwn index f63be0f..f1bd3f2 100644 --- a/examples/simple-bridging-with-dhcp-server-side.mdwn +++ b/examples/simple-bridging-with-dhcp-server-side.mdwn @@ -1,7 +1,9 @@ +> [[!meta title="simple-bridging-with-dhcp-server-side"]] +> > # Company: PowerCraft Technology > # Author: Copyright Jelle de Jong > # Note: Please send me an email if you enhanced the document -> # Date: 2010-05-24 +> # Date: 2010-05-24 / 2010-07-04 > # License: CC-BY-SA > > # This document is free documentation; you can redistribute it and/or @@ -97,6 +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 # optional > > cat /etc/network/interfaces > @@ -178,6 +181,7 @@ > > 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 @@ -186,6 +190,7 @@ > > 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 @@ -310,3 +315,11 @@ > 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 +> +> #-----------------------------------------------------------------------