Hi everyone. Have a CentOS 6.4 server with 2 NICs and need help with sharing the internet connection with my internal network. Tried much but am stumped. I can ping eth1 and eth0 from another machine on my network, but I cannot access outside of that.
eth0 = internet/public - address is DHCP assigned by my ISP
eth1 = internal/private - address is STATIC
Here are my config files:
/etc/sysconfig/network-scripts/eth0
Code:
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:21:5E:4E:8F:C2
ONBOOT=yes
/etc/sysconfig/network-scripts/eth1
Code:
DEVICE=eth1
BOOTPROTO=static
HWADDR=00:21:5E:4E:8F:C3
IPADDR=10.10.69.1
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
/etc/sysconfig/network
Code:
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=localhost.localdomain
/etc/sysconfig/iptables
Code:
# Generated by iptables-save v1.4.7 on Sun Aug 4 15:25:53 2013
*nat
:PREROUTING ACCEPT [1:229]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A POSTROUTING -o eth0 -j MASQUERADE
-A POSTROUTING -s 10.10.69.0/24 -o eth0 -j MASQUERADE
COMMIT
# Completed on Sun Aug 4 15:25:53 2013
# Generated by iptables-save v1.4.7 on Sun Aug 4 15:25:53 2013
*filter
:INPUT ACCEPT [27749:38830498]
:FORWARD DROP [1:76]
:OUTPUT ACCEPT [14565:779782]
COMMIT
# Completed on Sun Aug 4 15:25:53 2013
# Generated by iptables-save v1.4.7 on Sun Aug 4 15:25:53 2013
*mangle
:PREROUTING ACCEPT [27750:38830574]
:INPUT ACCEPT [27749:38830498]
:FORWARD ACCEPT [1:76]
:OUTPUT ACCEPT [14565:779782]
:POSTROUTING ACCEPT [14565:779782]
COMMIT
# Completed on Sun Aug 4 15:25:53 2013
Code:
[root@localhost sysconfig]# cat /proc/sys/net/ipv4/ip_forward
1
[root@localhost sysconfig]#
Code:
[shane@localhost ~]$ cat /etc/resolv.conf
; generated by /sbin/dhclient-script
nameserver 208.67.222.222
nameserver 208.67.220.220
[shane@localhost ~]$
Code:
[root@localhost ~]# cat /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 1
#net.ipv4.conf.default.fowarding = 1
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1
# Disable netfilter on bridges.
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
# Controls the default maxmimum size of a mesage queue
kernel.msgmnb = 65536
# Controls the maximum size of a message, in bytes
kernel.msgmax = 65536
# Controls the maximum shared segment size, in bytes
kernel.shmmax = 68719476736
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296
[root@localhost ~]#
Ping from server console:
Code:
[root@localhost ~]# ping 4.2.2.2
PING 4.2.2.2 (4.2.2.2) 56(84) bytes of data.
64 bytes from 4.2.2.2: icmp_seq=1 ttl=57 time=169 ms
64 bytes from 4.2.2.2: icmp_seq=2 ttl=57 time=68.5 ms
64 bytes from 4.2.2.2: icmp_seq=3 ttl=57 time=74.5 ms
64 bytes from 4.2.2.2: icmp_seq=4 ttl=57 time=70.3 ms
^C
--- 4.2.2.2 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3153ms
rtt min/avg/max/mdev = 68.514/95.823/169.933/42.844 ms
[root@localhost ~]#
Ping from laptop inside the network returns:
Code:
--- 4.2.2.2 ping statistics ---
10 packets transmitted, 0 received, 100% packet loss, time 8999ms
This is driving me crazy. Please help.
Thank you in advance!