14 lines
390 B
Bash
Executable File
14 lines
390 B
Bash
Executable File
#!/bin/bash
|
|
|
|
sysctl net.ipv4.ip_forward=1
|
|
IP4=192.168.200.0/244 # pas je iprange hier aan
|
|
IF=eth0 # uitgaande iface
|
|
|
|
iptables -t nat -A POSTROUTING -s ${IP4} -o ${IF} -j MASQUERADE
|
|
iptables -A FORWARD -s -s ${IP4} -o ${IF} -j ACCEPT
|
|
iptables -A FORWARD -d ${IP4} -m state \
|
|
--state ESTABLISHED,RELATED -i ${IF} -j ACCEPT
|
|
|
|
# zet in crontab
|
|
#@reboot bash /root/Route.sh # zonder eerste #
|