binding IPs

Mikkel L. Ellertson mikkel at
Wed Jun 6 14:47:05 UTC 2007

LC wrote:
>>> >> Thanks. This box is a samba machine. I want to allow local users
>>> and >> remote
>>> >> users to access it. I have 2 NIC on this box. eth0 is on a public
>>> >> IP( and eth1 is on the local IP( But
>>> how do >> i set
>>> >> the gateway? Can i specify the public gateway for eth0(
>>> and >> the
>>> >> gateway for eth1 ( and as for the gateway in
>>> >> /etc/sysconfig/network i will remove it. Will this work?
> I had tested  with the above and is the default route.. I
> have no problem going into the internet via the router on I
> can ping both the public and local IP in LAN, but I am cannot ping the
> public IP from another network.
> [root at samba ~]# netstat -r
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags   MSS Window  irtt
> Iface
>   *      U         0 0          0 eth0
>     *        U         0 0          0
> eth1
>     *          U         0 0          0
> eth1
> default         UG        0 0          0
> eth1
> [root at samba ~]#
> [root at samba ~]# ip route
> dev eth0  proto kernel  scope link  src
> dev eth1  proto kernel  scope link  src
> dev eth1  scope link
> default via dev eth1
> [root at samba ~]#
> The machine does not have a firewall yet, so i guess the public IP is
> not routed out, therefore unreachable.
> How do I route the public IP out?
> Thanks
There are a bunch of problems here. The first is that your default
route should be through eth0 with the gateway your ISP gives you.
(12.73.1.<something>). If you want the machines on the
network to be able to access the Internet through this box, you will
also have to set up some NAT iptable rules. Take a look at the
firewall packages and see what on is easy for you to understand -
NAT is normally set up as part of the firewall.

You really need to read one of the networking and firewall HOWTOs so
that you understand what you are doing, or get someone locally to
set this up for you. Without a basic understanding of how networking
works, it is too easy to make mistakes or misunderstand instructions
when using advice from a mailing list.


  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

More information about the fedora-list mailing list