0

i am having Ubuntu box with two nic,eth0:for private and eth1 for public with static ip assigned.

on eth0:192.168.30.1 eth1:x.x.106.111

I want to set this box as Default gateway for all the other machines and wan to do NAT ing on it.

But after assigning Ip address in eth1 i am not able to ping 192.168.30.0 network and Public Ips.

route

default x.x.106.1 iface eth1

x.x.106.0 * 255.255.255.0 eth1

192.168.30.0 * 255.255.255.0 eth0

How to solve this,can some one tell me what is the difference in making gw through eth0 and eth1

1 Answer 1

1

Not sure I understand your problem, but...

the default gateway should definitely be the gateway on the public network side (e.g. your ISP's gateway). With that in mind, your routing table looks good (x.x.106.1 is the public network gateway, right?)

On this Ubuntu machine, try pinging hosts on both networks. If it works, you're doing fine. If not, start checking if the firewall is up or even simple stuff like if the cables are connected properly (happens more often that we'd like to admit).

The next steps are a) enabling IP forwarding b) setting up iptables to perform NAT

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .