cse331 2017 - firewalls and gatewaysmikepo/cse331/2017/lectures/cse3… · a secure socks5 proxy,...

32

Upload: duongduong

Post on 18-Sep-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 2: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 3: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 4: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 5: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 6: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 7: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 8: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 9: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 10: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 11: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!

192.168.0.10

192.168.0.11

192.168.0.12

130.245.27.2

Page 12: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!

SSH server192.168.0.10:1234

130.245.27.2:22130.245.27.2:80

Web server192.168.0.10:80

Page 13: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 14: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 15: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!

nc -l -p 12345 -c ‘nc blocked.com 80’

wget remote.edu:12345

ssh -L 12345:blocked.com:80 remote.edu

ssh -R 8080:localhost:80 remote.edu

Page 16: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 17: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!

ssh –D 12345 sshserver.com

chrome --proxy-server='socks://localhost:12345'

Page 18: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 19: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 20: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 21: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!

# flush all chainsiptables -Fiptables –X

# defaults for predefined chainsiptables -P INPUT DROPiptables -P OUTPUT DROPiptables -P FORWARD DROP

# allow anything on localhost interfaceiptables -A INPUT -i lo -j ACCEPTiptables -A OUTPUT -o lo -j ACCEPT

# allow all traffic from specific subnetsiptables -A INPUT -s 128.59.0.0/255.255.0.0 -j ACCEPTiptables -A INPUT -s 160.39.0.0/255.255.0.0 -j ACCEPT

Page 22: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!

# allow all inbound traffic for specific servicesiptables -A INPUT -p tcp -m tcp --syn --dport 22 -j ACCEPTiptables -A INPUT -p tcp -m tcp --syn --dport 80 -j ACCEPT

# allow inbound established and related outside communicationiptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT

# allow ICMPiptables -A INPUT -p icmp -j ACCEPT

# allow all outgoing trafficiptables -A OUTPUT -j ACCEPT

Page 23: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 24: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 25: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 26: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 27: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 28: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 29: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 30: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 31: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!
Page 32: CSE331 2017 - Firewalls and Gatewaysmikepo/CSE331/2017/lectures/CSE3… · A secure socks5 proxy, designed to protect your Internet traffic. download config spec about Try it now!