[SOLVED]IP Forwarding strange problem ....
Dear All,
I'm newbie in RH7 Networking but I'd like to use it to make a new server with one Nic and some vlan to route traffic from private to public.
This is the scenario:
ETH0: 10.0.199.199 / 16
ETH0.2: 10.2.0.251 / 16
ETH0.101: 1.1.1.1 / 24 (public)
GATEWAY 1.1.1.254
all of them are in /etc/sysconfig/network-scripts/ifcfg-XXXX and also in /etc/sysconfig/network is FORWARDING=YES
Before start I read some guide and I've made this settings:
net.ipv4.ip_forwarding = 1
all iptables chains flush and set to ACCEPT (only for debug purpose) , also set masquearding to nat traffic from private to public
iptables -t nat -A POSTROUTING -s 10.0.0.0/255.0.0.0 ! -d 10.0.0.0/255.0.0.0 -o eth0.101 -j SNAT --to-source 1.1.1.1
Firewalld is stopped because I don't want use it.
After that I've used ping to make test:
[root@centos-7 ~]# ping -I eth0 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 10.0.199.199 eth0: 56(84) bytes of data.
From 10.0.0.9 icmp_seq=1 Packet filtered
From 10.0.0.9 icmp_seq=2 Packet filtered
but as you can see it doesn't work !
Any ideas ?
Thanks a lot.
Regards
Willy
Last edited by willy70; 05-31-2017 at 08:13 AM.
|