pedora speedy roter
Pada dasarnya posting ini di buat, cuma buat ngingatin gweh..!! aja..!! sekalian buat memenuhi janji gweh ama BOTOL, untung posting tentang setting ip di fedora buat koneksi speedy…!!
Mudah²an bermanfaat..!!
[root@planet ~]# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=planet.web.id
GATEWAY=192.168.1.1
[root@planet ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.1.255
HWADDR=00:80:48:30:7C:27
IPADDR=192.168.1.3
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes
[root@planet ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
BROADCAST=192.168.0.255
HWADDR=00:0B:6A:9B:64:6E
IPADDR=192.168.0.1
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes
[root@planet ~]# vi /etc/resolv.conf
search web.id
nameserver 202.134.0.155
nameserver 203.130.193.74
[root@planet ~]# vi /etc/sysctl.conf
rubah
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
jadi
# Controls IP packet forwarding
net.ipv4.ip_forward = 1
atau pake cara ini
[root@planet ~]# echo “1″ > /proc/sys/net/ipv4/ip_forward
[root@planet ~]# /etc/init.d/network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Disabling IPv4 packet forwarding: [ OK ]
Setting network parameters: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
[root@planet ~]# chkconfig –level 2345 network on
[root@planet ~]# ping 202.134.0.155
PING 202.134.0.155 (202.134.0.155) 56(84) bytes of data.
64 bytes from 202.134.0.155: icmp_seq=1 ttl=61 time=85.7 ms
64 bytes from 202.134.0.155: icmp_seq=2 ttl=61 time=87.5 ms
64 bytes from 202.134.0.155: icmp_seq=3 ttl=61 time=88.9 ms
— 202.134.0.155 ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2001ms
rtt min/avg/max/mdev = 85.719/87.412/88.925/1.358 ms
[root@planet ~]# ping google.com
PING google.com (64.233.167.99) 56(84) bytes of data.
64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=1 ttl=241 time=314 ms
64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=2 ttl=241 time=312 ms
64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=3 ttl=241 time=372 ms
— google.com ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 312.349/332.973/372.535/27.986 ms
[root@planet ~]# /etc/init.d/named restart
Stopping named: [ OK ]
Starting named: [ OK ]
[root@planet ~]# /etc/init.d/iptables stop
Flushing all chains: [ OK ]
Removing user defined chains: [ OK ]
Resetting built-in chains to the default ACCEPT policy: [ OK ]
[root@planet ~]# /sbin/iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.0/24 -j MASQUERADE
[root@planet ~]# /sbin/iptables -A PREROUTING -t nat -i eth1 -p udp –dport 80 -j REDIRECT –to-port 3128
[root@planet ~]# /sbin/iptables -A PREROUTING -t nat -i eth1 -p tcp –dport 80 -j REDIRECT –to-port 3128
[root@planet ~]# /sbin/iptables-save > /etc/sysconfig/iptables
[root@planet ~]# iptables-save
[root@planet ~]# /etc/init.d/iptables restart
Flushing all current rules and user defined chains: [ OK ]
Clearing all current rules and user defined chains: [ OK ]
Applying iptables firewall rules: [ OK ]
Oke..!! selanjutnya install squid proxy…!!
Komentar
Posting Komentar