|
| Hi,
Before I use 56k modem and share the line with 2 other computers, works
fine. My setup is: Linux connect to internet with modem, connect to the
router. All 3 other windows machines connect to the router. All have ip
address 192.168.0.x
Now I installed DSL with static IP. My setup: Linux got 2 ethernet cards,
one connect to dsl modem (westell wirespeed) and another connect to the
router, the windows machines are not changed. The modem got a fixed ip at
192.168.1.254 (fixed factory value).
I wanted to:
1. Make a webserver so other people on the net can access it.
2. let all 2 Windows XP share the dsl (just go out, no need to make
server).
I am very new to DSL so after some research, I was able to make it work
under windows (boot to windows and change the ethernet card connected to DSL
's ip to the static ip, and set DSL modem to ip passthrough mode).
However on linux, If I changed the ip address of the ethernet card that
is connected to DSL modem (eth0) to the static ip, nothing works. After a
while I figured out that each ethernet card can have multiple ips. So I set
the static ip address to eth0, and set 192.168.1.1 also to eth0 (shown in
redhat network config as eth0:1). This way the outside can see my server.
However the other computers can't go online
(I use iptables,
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
this configuration works if I don't let eth0 have 2 ip addresses, just set
eth0 to 192.168.1.1 and set gateway to 192.168.1.254. However if I do that
the others on internet can't see my server).
I also tried to use SNAT, which is suggested way of doing things when ip
addresses are static.
so here is what I tried (with all iptables flushed
iptables -t nat -A POSTROUTING -p tcp -o eth0 -j SNAT --to-source
my.outside.static.ip
Doesn't work either.
I will keep trying, mean while if anybody got any ideas please post on the
newsgroup
Thank you!
LnxMouse
|
|