Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

urgent. internet sharing 4

Status
Not open for further replies.

dekcool

Programmer
Oct 2, 2002
231
0
0
PH
hi!

first time in linux
want to know how to setup internet connection

server=linux
client=win98

i enable to run internet using linux
thanks in advance ____________________________________________________
Invest your time in learning, Not just practicing.

DEK
 
request timeout for yahoo

i added to DNS to WIn98 Client still not working

____________________________________________________
Invest your time in learning, Not just practicing.

DEK
 
thanks to all

i made it! ____________________________________________________
Invest your time in learning, Not just practicing.

DEK
 
Thank god for that!!

Congratulations - got there in the end!!
ChrisCW

** Helen Waite is now in charge of all rush orders. If you are in a hurry, just go to Helen Waite.
 
im back with my problem
maybe i dont how i do it

i cant get go public site again.

give some advice please
____________________________________________________
Invest your time in learning, Not just practicing.

DEK
 
Hi,

Can you paste me from linux machine the following:

1) ifconfig -a
2) firewall script (NAT).
3) /etc/resolv.conf

From client:

1)winipcfg detail.

regards,
feroz
 
1)ifconfig -a

eth0 Link encap:Ethernet HWaddr 00:E0:4C:6B:C4:BC
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:303 errors:0 dropped:0 overruns:0 frame:0
TX packets:344 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:280703 (274.1 Kb) TX bytes:63929 (62.4 Kb)
Interrupt:11 Base address:0xc000

eth1 Link encap:Ethernet HWaddr 00:E0:4C:6B:C6:8F
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:127 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:12239 (11.9 Kb) TX bytes:8171 (7.9 Kb)
Interrupt:10 Base address:0xe000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:14 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1036 (1.0 Kb) TX bytes:1036 (1.0 Kb)

ppp0 Link encap:point-to-Point Protocol
inet addr:202.57.88.152 P-t-P:202.57.88.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:278 errors:0 dropped:0 overruns:0 frame:0
TX packets:314 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:273027 (266.6 Kb) TX bytes:53751 (52.4 Kb)

2eth0 Link encap:Ethernet HWaddr 00:E0:4C:6B:C4:BC
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:303 errors:0 dropped:0 overruns:0 frame:0
TX packets:344 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:280703 (274.1 Kb) TX bytes:63929 (62.4 Kb)
Interrupt:11 Base address:0xc000

eth1 Link encap:Ethernet HWaddr 00:E0:4C:6B:C6:8F
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:127 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:12239 (11.9 Kb) TX bytes:8171 (7.9 Kb)
Interrupt:10 Base address:0xe000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:14 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1036 (1.0 Kb) TX bytes:1036 (1.0 Kb)

ppp0 Link encap:point-to-Point Protocol
inet addr:202.57.88.152 P-t-P:202.57.88.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:278 errors:0 dropped:0 overruns:0 frame:0
TX packets:314 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:273027 (266.6 Kb) TX bytes:53751 (52.4 Kb)

eth0 Link encap:Ethernet HWaddr 00:E0:4C:6B:C4:BC
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:303 errors:0 dropped:0 overruns:0 frame:0
TX packets:344 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:280703 (274.1 Kb) TX bytes:63929 (62.4 Kb)
Interrupt:11 Base address:0xc000

eth1 Link encap:Ethernet HWaddr 00:E0:4C:6B:C6:8F
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:127 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:12239 (11.9 Kb) TX bytes:8171 (7.9 Kb)
Interrupt:10 Base address:0xe000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:14 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1036 (1.0 Kb) TX bytes:1036 (1.0 Kb)

ppp0 Link encap:point-to-Point Protocol
inet addr:202.57.88.152 P-t-P:202.57.88.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:278 errors:0 dropped:0 overruns:0 frame:0
TX packets:314 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:273027 (266.6 Kb) TX bytes:53751 (52.4 Kb)

eth0 Link encap:Ethernet HWaddr 00:E0:4C:6B:C4:BC
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:303 errors:0 dropped:0 overruns:0 frame:0
TX packets:344 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:280703 (274.1 Kb) TX bytes:63929 (62.4 Kb)
Interrupt:11 Base address:0xc000

eth1 Link encap:Ethernet HWaddr 00:E0:4C:6B:C6:8F
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:127 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:12239 (11.9 Kb) TX bytes:8171 (7.9 Kb)
Interrupt:10 Base address:0xe000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:14 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1036 (1.0 Kb) TX bytes:1036 (1.0 Kb)

ppp0 Link encap:point-to-Point Protocol
inet addr:202.57.88.152 P-t-P:202.57.88.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:278 errors:0 dropped:0 overruns:0 frame:0
TX packets:314 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:273027 (266.6 Kb) TX bytes:53751 (52.4 Kb)

2) firewall script(NAT) how can i get this ? i set firewall to nothing

3) /etc/resolv.conf
search localdomain
nameserver 203.172.11.26
nameserver 202.57.96.4


Client:
ip: 192.168.0.18
mask:255.255.255.0
gateway:192.168.0.1

how can i thank you for ur time, i really appreciate ____________________________________________________
Invest your time in learning, Not just practicing.

DEK
 
im sorry i paste 3 times ____________________________________________________
Invest your time in learning, Not just practicing.

DEK
 
maybe my problem is how can i setup my iptable
iam typing it to terminal shell console is that ok ____________________________________________________
Invest your time in learning, Not just practicing.

DEK
 
Hi,

What is eth0? Your eth0 doesnt have any ip assigned?

So eth1 is you LAN and ppp0 is your internet?

Create file called firewall.sh. Inside paste the following:

#!/bin/sh
# Assigned variable
IPT="/sbin/iptables"
INT="ppp0"

# Flush firewall rules
$IPT -F
$IPT -F INPUT
$IPT -F OUTPUT
$IPT -F FORWARD
$IPT -F -t mangle
$IPT -F -t nat
$IPT -X

# These will setup our policies.
$IPT -P INPUT DROP
$IPT -P OUTPUT ACCEPT
$IPT -P FORWARD ACCEPT

# Enable ip forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward

# If you on static ip change the ip below.
$IPT -t nat -A POSTROUTING -o $INT -j SNAT --to 21.21.21.21

# If you on dynamic ip uncomment below line and comment out
# above line
#$IPT -t nat -A POSTROUTING -o $INT -j MASQUERADE

# This rule protects your fowarding rule.
$IPT -A FORWARD -i $INT -m state --state NEW,INVALID -j DROP

# Accept connection from local machine
$IPT -A INPUT -i lo -j ACCEPT
$IPT -A INPUT -s 192.168.0.18 -d 0/0 -p all -j ACCEPT

# Drop all incoming
$IPT -A INPUT -j DROP

Chmod 700 firewall.sh . Then run it. Type "iptables -L" and paste here.

regards,
feroz
 
my dsl modem connected to eth0
and eth1 for the hub ____________________________________________________
Invest your time in learning, Not just practicing.

DEK
 
Hi,

hmmm, eth0 for dsl modem but your eth0 doesnt have any ip? how come? Yet your ppp0 contains ip. Im not on dsl line. Very confuse here.

Try the script and see what happen.

regards,
feroz
 
Dek,

Are you prepared to start up ssh (type service ssh start) for a short while and I will connect in and have a look for you (and post results here)???

ChrisCW

** Helen Waite is now in charge of all rush orders. If you are in a hurry, just go to Helen Waite.
 
hi,

i created file at /usr/Dek/firewall.sh

-----
IPT="/sbin/iptables"
INT="ppp0"

$IPT -F
$IPT -F INPUT
$IPT -F OUTPUT
$IPT -F FORWARD
$IPT -F -t mangle
$IPT -F -t nat
$IPT -X

$IPT -P INPUT DROP
$IPT -P OUTPUT ACCEPT
$IPT -P FORWARD ACCEPT

echo 1 > /proc/sys/net/ipv4/ip_forward

$IPT -t nat -A POSTROUTING -o $INT -j MASQUERADE

$IPT -A FORWARD -i $INT -m state --state NEW,INVALID -j DROP

$IPT -A INPUT -i lo -j ACCEPT
$IPT -A INPUT -s 192.168.0.18 -d 0/0 -p all -j ACCEPT

$IPT -A INPUT -j DROP
-----

Chmod 700 firewall.sh ? sorry but i dont get this

then i double click the file to run
and i typed: iptable -L

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
____________________________________________________
Invest your time in learning, Not just practicing.

DEK
 
thanks a lot
guys its working again im posting here from the client
any idea what's getting me wrong
after i typed what dbase77 gave me then it shows


accept anywhere

many thanks again ____________________________________________________
Invest your time in learning, Not just practicing.

DEK
 
im a first timer redhat user
i dont even knows how to log as root at first
thanks for your patience guys and this tek-tips it really helps

Thanks God
____________________________________________________
Invest your time in learning, Not just practicing.

DEK
 
Hi,

Open your x terminal. change the permission on the file as chmod 700 firewall.sh. 700 = rwx for owner ONLY. Then run it from command line. cd to /usr/Dek. Then ./firewall.sh.

After that run iptables -L again.

regards,
feroz
 
Hi,

Does it work? If yes then I suggest you read more about linux security and how to protect your linux box using iptables. Read the howto website -
open browser and search for iptables howto should give you lots of reply. That firewall is basic to give you idea about masquerade under linux. With iptables you can control what goes IN/OUT etc. For a start disable all the services. To check any running services type "netstat -a".

regards,
feroz
 
feroz,

My bet is that trying to learn how to correctly setup a firewall script using iptables is a little too much for DEK.

Dek,

what version of redhat are you using? There should be a gui for creating a firewall script. Save all the stuff you had to do to get it working to begin with, though. I'm almost positive Redhat 8.0 has a GUI for configuring all this, but alas I'm trapped at work with Windows XP and cannot confirm this. Oh, and this is all much easier to do with Suse, by the way, if you ever want to switch distros.

-Venkman
 
thanks guys,

maybe ill just use this settings for the meantime
and ill read some HOWTO in the net to configure my linux box properly

more power to you guys! ____________________________________________________
Invest your time in learning, Not just practicing.

DEK
 
Sure, but keep in mind you are running without a firewall right now.... which might not be the safest thing to do.

-Venkman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top