1

I've been looking for an answer for my problem but I've found some things that I couldn't understand.

I have a network with some machines running Windows and Ubuntu Desktop. I also have one server running Ubuntu Server. Everything works fine.

That I want is make this Server a firewall. I supose that I must have two network cards (I actually have them) and connect ISP modem to eth0 and eth1 goes to the switch where are the other machines connected.

I read about Shorewall but I don't know how to configure it and I can't connect to Internet with the others. My current configuration (LAN works OK, but WAN doesn't) is the following:

SERVER:

auto eth0

iface eth0 inet static

    address 192.168.1.250
    gateway 192.168.1.4
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255

auto eth2

iface eth2 inet static

    address 192.168.1.2
    gateway 127.0.0.1
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.26.255

The client has as a gateway the IP of eth2.

With this configuration, I can't connect to the Internet. If I do a ping to 192.168.1.2 or 250, it replies successfully.

1
  • do you want to use it has a firewall that also serves as a proxy? Nov 29, 2011 at 21:03

1 Answer 1

1

How do you get your IP-address from ADSL? With DHCP? or do you have a static IP? eth0 should be configured regarding to what you use to configure IP.

As your eth0 config looks now you have a default gateway at the IP 192.168.1.4 and this would be your ADSL connection with this configuration.

eth2 you say is your local network. The problem here is that you have the same (!) IP-network (192.168.1.0) om both interfaces. That means that there is nothing to route for your server. I don't think 127.0.0.1 is a valid gateway either (eth2). You probably don't need any gateway address on your local network. Another mistake is that eth2 has 192.168.26.255 as broadcast address. That is not a valid address on your network 192.168.1.0 you have defined for eth2.

What you have to do is to configure eth0 as it should be. And if your default gateway to the internet is 192.168.1.4 you must not use 192.168.1.0 network on eth2 (local net).

1
  • I totally agreed with Jonasbjork very nicely he told Dec 8, 2011 at 10:13

You must log in to answer this question.

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