Jump to content

Routing/Network etc


wlessard
 Share

Recommended Posts

As I said, it depends what you're using, so if iptables, this is what you need to do:

 

From here:

 

http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch14_:_Linux_Firewalls_Using_iptables#Masquerading_.28Many_to_One_NAT.29

 

iptables -A POSTROUTING -t nat -o eth0 -s 192.168.1.0/24 -d 0/0 -j MASQUERADE

 

assuming that eth0 is your internet connection, because you mentioned eth1 is your internal network. Replace the IP address with your internal network if it's different.

 

Check if your machines can then access the internet or simply from a machine do:

 

ping 8.8.8.8

 

and if it replies, that means it's working. Then to save it:

 

service iptables save

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...