Live Journal

All About Log

iptables warnet standar

sebenarnya ini dah banyak banget di tulis para pendahulu..

saya post ini buat mengingat dan mempermudah saya saat setting router warnet

vi /etc/sysconfig/network
vi /etc/sysconfig/network-scripts/ifcfg-eth0
vi /etc/resolv.conf
vi /etc/sysctl.conf
/etc/init.d/network restart
chkconfig --level 2345 network on
ping 202.134.0.155
ping google.com
/etc/init.d/named restart
chkconfig --level 2345 named on
vi /etc/sysconfig/network-scripts/ifcfg-eth1
/etc/init.d/network restart
ping 192.168.0.1
/etc/init.d/iptables stop
/sbin/iptables -A PREROUTING -t nat -i eth1 -p udp --dport 80 -j REDIRECT --to-port 3128
/sbin/iptables -A PREROUTING -t nat -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
/sbin/iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.0/24 -j MASQUERADE
/sbin/iptables-save > /etc/sysconfig/iptables
/etc/init.d/iptables restart

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: