Wednesday, November 26, 2014

linux - Block all but http traffic on a network interface

I've got two network interfaces on an Ubuntu machine which go out to two different networks but both have internet gateways.


I need to limit it so that any outgoing http requests it makes (ie through wget) only go through eth0 and all other traffic goes through eth1.


I dare say the solution might have something to do with iptables but I've no experience with it so would appreciate all help.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...