1)Two Lan cards details:
Eth0 : (WAN)
IP address: 66.178.43.4
Subnet mask: 255.255.255.128
Defaut Gateway: 66.178.43.1
Eth1: (LAN)
IP address 192.168.0.1
Subnet mask: 255.255.255.0
Default Gatway: 66.178.43.4 (eth0)
2) Packet forwarding from Eth0 – Eth1:
Vi /etc/sysctl.conf
==============================================
# Controls IP packet forwarding
net.ipv4.ip_forward = 0 [Change to "1"]
==============================================
save file: Esc, Shift+: wq (save and quit)
3) How to enable IPtables between two lan cards to pass data:
"iptables –t nat –A POSTROUTING –o eth0 –j SNAT –-to–source 66.178.43.4"
then save IPtables : "iptables-save > /etc/sysconfig/iptables"
service network restart...........
4) Should be enable iptables from boot " ntsysv" clik iptables
Eth0 : (WAN)
IP address: 66.178.43.4
Subnet mask: 255.255.255.128
Defaut Gateway: 66.178.43.1
Eth1: (LAN)
IP address 192.168.0.1
Subnet mask: 255.255.255.0
Default Gatway: 66.178.43.4 (eth0)
2) Packet forwarding from Eth0 – Eth1:
Vi /etc/sysctl.conf
==============================================
# Controls IP packet forwarding
net.ipv4.ip_forward = 0 [Change to "1"]
==============================================
save file: Esc, Shift+: wq (save and quit)
3) How to enable IPtables between two lan cards to pass data:
"iptables –t nat –A POSTROUTING –o eth0 –j SNAT –-to–source 66.178.43.4"
then save IPtables : "iptables-save > /etc/sysconfig/iptables"
service network restart...........
4) Should be enable iptables from boot " ntsysv" clik iptables
Credits: nsharif.blogspot.com
Comments (0)
Post a Comment