Not sure if its the INPUT or FORWARD table, but it's something like this:
iptables -A FORWARD -i eth1 -s 10.101.189.0/24 -d 192.168.0/24 -j DROP
On Sat, Aug 21, 2010 at 9:51 PM, Makara <chanmakara@gmail.com> wrote:
Hi All,Here is my network diagram/ LAN1 [10.101.189.0/24]internet---------------[eth0]--------------{Linux}-----------------[eth1]\LAN2 [192.168.0/24]My iptables script# EDIT This line onlyIP_WAN=x.x.x.x# DO NOT EDITecho "1" > /proc/sys/net/ipv4/ip_forwardmodprobe ip_conntrackmodprobe ip_nat_ftpmodprobe ip_conntrack_ftp# Flush all rulesiptables -F INPUTiptables -F FORWARDiptables -F OUTPUTiptables -F -t natiptables -F -t mangle# Default Policiesiptables -P INPUT ACCEPTiptables -P FORWARD ACCEPTiptables -P OUTPUT ACCEPT# Allow UDP, DNS and Passive FTPiptables -A INPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPTiptables -A FORWARD -m state --state NEW,RELATED,ESTABLISHED -j ACCEPTiptables -A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT# garena gameiptables -t nat -A PREROUTING -p udp -i eth0 -d 0/0 --dport 1511:1611
# Transparent Proxy if it's network gameiptables -A PREROUTING -t nat -i eth1 -s 10.101.189.0/24 -p tcp --dport 80 -j REDIRECT --to-port 3128# NATiptables -A POSTROUTING -t nat -o eth0 -j SNAT --to-source $IP_WANBoth LAN1 n LAN2 can access internet it's good but they can access to each other.Please kindly help, I don't want LAN1 connect to LAN2 or LAN2 connect to LAN1.--The person who loves others will also be loved.
--
Best Regards,
Stephen
No comments:
Post a Comment