File: iptables.sh

package info (click to toggle)
ltsp 5.5.4-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 5,440 kB
  • ctags: 359
  • sloc: sh: 5,106; ansic: 1,590; perl: 280; python: 197; makefile: 171; lex: 152; yacc: 59
file content (11 lines) | stat: -rw-r--r-- 351 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash
echo "1" > /proc/sys/net/ipv4/ip_forward
ifconfig eth0:0 192.168.11.1
iptables -F
iptables -t nat -F
iptables -t nat -X
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P OUTPUT ACCEPT
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
#iptables -A INPUT -m state --state NEW -i eth1 -j REJECT