Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sysctl -w net.ipv4.ip_forward=1
- sysctl -w net.ipv4.conf.all.route_localnet=1
- iptables -F
- iptables -X
- iptables -t nat -F
- iptables -t nat -X
- iptables -t mangle -F
- iptables -t mangle -X
- iptables -t raw -F
- iptables -t raw -X
- iptables -P INPUT DROP
- iptables -P OUTPUT ACCEPT
- iptables -P FORWARD DROP
- iptables -I INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
- iptables -I INPUT -p icmp --icmp-type echo-reply -j ACCEPT
- iptables -I INPUT -p icmp --icmp-type destination-unreachable -j ACCEPT
- iptables -I INPUT -p icmp --icmp-type time-exceeded -j ACCEPT
- iptables -I INPUT -p icmp --icmp-type echo-request -j ACCEPT
- iptables -t nat -A PREROUTING -i vboxnet0 -p tcp --dport 9050 -j DNAT --to-destination 127.0.0.1:9050
- iptables -A INPUT -i vboxnet0 -d 127.0.0.1 -p tcp --dport 9050 -j ACCEPT
- iptables -I INPUT -i lo -j ACCEPT
- iptables -I OUTPUT -o vboxnet0 -j DROP
- iptables -I OUTPUT -o vboxnet0 -p tcp --sport 9050 -j ACCEPT
- iptables -I OUTPUT -o vboxnet0 -p icmp --icmp-type echo-reply -j ACCEPT
- iptables -I OUTPUT -o vboxnet0 -p icmp --icmp-type destination-unreachable -j ACCEPT
- iptables -I OUTPUT -o vboxnet0 -p icmp --icmp-type time-exceeded -j ACCEPT
- iptables -I OUTPUT -o vboxnet0 -p icmp --icmp-type echo-request -j ACCEPT
- iptables -I OUTPUT -o lo -j ACCEPT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement