0

I am trying to setup a Gateway / Firewall between our router and Windows AD network! I have followed a lot of instructions and tutorials on the web but i am still missing something as i cannot get INTERNET access from the internal network(Windows) to pass through the Linus Box!

There are 2 Ethernet adapters in the box ...Both have static IP's as both sides of the network are setup using this configuration.

Internal NIC enp3s0 ...11.0.0.2 (255.255.255.0)
External NIC enp2s0 ...10.0.0.3 (255.255.255.0)

Some things i can do! 

1) I can... from the internal network ping any of those IP's Above! enp3s0 is directly attached to the internal network and enp2s0 is INTERNET facing (DSL Router)

Here is some more info! 

Any pointers will be much appreciated !

enp2s0    Link  encap:Ethernet   HWaddr  c4:12:f5:31:84:40  
          inet  addr:10.0.0.3   Bcast:10.0.0.255   Mask:255.255.255.0
          inet6  addr:  fe80::cd1a:d428:fd52:1ad2/64  Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13371 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13400 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:7781316 (7.7 MB)  TX bytes:1791327 (1.7 MB)

enp3s0    Link  encap:Ethernet   HWaddr  00:30:67:2d:27:18  
          inet  addr:11.0.0.2   Bcast:11.0.0.255   Mask:255.255.255.0
          inet6  addr:  fe80::d24b:38b2:cb59:4e3f/64  Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:870 errors:0 dropped:0 overruns:0 frame:0
          TX packets:190 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:63526 (63.5 KB)  TX bytes:15403 (15.4 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:3239 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3239 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:375798 (375.7 KB)  TX bytes:375798 (375.7 KB)

-----------------------------------------------------------------------------

Kernel IP routing table

Destination      Gateway          Genmask          Flags Metric Ref     Use  Iface

0.0.0.0          10.0.0.2         0.0.0.0          UG     100     0         0  enp2s0

0.0.0.0          10.0.0.3         0.0.0.0          UG     101     0         0  enp3s0

10.0.0.0         0.0.0.0          255.255.255.0    U      100     0         0  enp2s0

10.0.0.3         0.0.0.0          255.255.255.255  UH     100     0         0  enp3s0

11.0.0.0         0.0.0.0          255.255.255.0    U      100     0         0  enp3s0

169.254.0.0      0.0.0.0          255.255.0.0      U      1000    0         0  enp2s0
Rinzwind
  • 299,756

1 Answers1

0

You must run this command to route packets from internal network to external interface via iptables.

iptables -t nat -A POSTROUTING -s 11.0.0.0/24 -o enp2s0 -j MASQUERADE

also open /etc/sysctl.conf and
change net.ipv4.ip_forward=0 to net.ipv4.ip_forward=1.

then enter this command:

sysctl -p