CalcProgrammer1

OpenVPN Router Start-up

Nov 30th, 2013
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. # Setup OpenVPN server port tap1
  2. openvpn --mktun --dev tap1
  3. brctl addif br0 tap1
  4. ifconfig tap1 0.0.0.0 promisc up
  5.  
  6. # Setup OpenVPN client port tap0
  7. sleep 30
  8. openvpn --config /tmp/openvpncl/openvpn.conf > /tmp/openvpncl/openvpncl.log &
  9. sleep 10
  10. ifconfig tap0 0.0.0.0
  11. brctl addif br0 tap0
  12. sleep 15 ; insmod ebtables ; insmod ebtable_filter ; insmod ebt_ip &
  13. sleep 25 ; ebtables -I INPUT -i tap0 -p IPv4 --ip-protocol udp --ip-destination-port 67:68 -j DROP &
  14. sleep 5 ; ebtables -I OUTPUT -o tap0 -p IPv4 --ip-protocol udp --ip-destination-port 67:68 -j DROP &
Advertisement
Add Comment
Please, Sign In to add comment