Guest User

Untitled

a guest
Jun 24th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. echo "Configuring eth0"
  4. ifconfig eth0 10.2.1.2 netmask 255.255.255.0 up
  5. echo "Configuring eth1"
  6. ifconfig eth1 10.3.1.2 netmask 255.255.255.0 up
  7.  
  8. sleep 1
  9.  
  10. echo "Add default route into default table"
  11. ip route add 10.1.1.0/24 dev eth0 scope link
  12. ip route add 10.1.2.0/24 dev eth0 scope link
  13. ip route add 10.3.2.0/24 dev eth1 scope link
  14.  
  15. sysctl -w net.ipv4.ip_forward=1
  16.  
  17. # configure tproxy
  18. ip rule add fwmark 1 lookup 100
  19. ip route add local 0.0.0.0/0 dev lo table 100
  20.  
  21. iptables -t mangle -A PREROUTING -p tcp -j MARK --set-mark 0x0001
  22.  
  23. echo "coupled" > /proc/sys/net/ipv4/tcp_congestion_control
Add Comment
Please, Sign In to add comment