我覺得拆走佢個router會彈性大啲,換自己router上去
WAN IP: 113.x.32.233
WAN Gateway:113.x.32.232
Subnet mask: 255.255.255.254
LAN IP1: 192.168.1.1(255.255.255.0)
LAN IP2: 113.x.61.137(255.255.255.248)
firewall rules
(Your own rules)
iptables -A INPUT -i wan -j DROP
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o wan -j MASQUERADE
iptables -A FORWARD -o wan -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i wan -j DROP
iptables -A FORWARD -j ACCEPT
如果你冇自己rules,入面電腦可互連/可出街,外面電腦連唔到入黎。
如要開port,
iptables -A FORWARD -d (Your public IP) -p tcp --dport 80 -j ACCEPT
This example is for HTTP.
Expose a public IP to internet for access from internet:
iptables -A FORWARD -d (Your Public IP) -j ACCEPT