eth0, eth0:0 and Masq

eth0, eth0:0 and Masq

Post by Bryan Buchan » Sat, 21 Feb 1998 04:00:00



I've got a setup as follows:

Win 95 system 192.168.1.3
SCO/UNIX 192.168.1.1
Linux 192.168.1.5

Linux has PPP link to ISP on 139.130.38.65.
Linux needs to be seen by the world as 203.35.234.182

These all talk fine on 192.168.1.X. The "netstat -nr" below from
linux shows the routing:
----------------------------
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt
Iface
139.130.38.65   0.0.0.0         255.255.255.255 UH     1500 0     0 ppp0
203.35.234.176  0.0.0.0         255.255.255.248 U      1500 0     0 eth0:0
192.168.1.0     0.0.0.0         255.255.255.0   U      1500 0     0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U      3584 0     0 lo
0.0.0.0         139.130.38.65   0.0.0.0         UG     1500 0     0 ppp0
----------------------------

This sets up the public interface and the masquerading:

----------------------------
#!/bin/sh
#
# /etc/rc.d/rc.localnet
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin
#
# add public interface on same network interface as local
#

DEVICE=eth0:0
IPADDR=203.35.234.182
NETMASK=255.255.255.248
NETWORK=203.35.234.176
BROADCAST=203.35.234.183

ifconfig ${DEVICE} ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
route add -net ${NETWORK} netmask ${NETMASK}
#
# Masquerading rules
#

LOCALNET=192.168.1.0/24
ANYWHERE=any/0

ipfwadm -F -p deny
ipfwadm -F -a m -P tcp -S ${LOCALNET} -D ${ANYWHERE}
ipfwadm -F -a m -P udp -S ${LOCALNET} -D ${ANYWHERE}
#
# load modules for FTP
#
/sbin/depmod -a
/sbin/modprobe ip_masq_ftp
----------------------------

Problem: Win95 and SCO cannot see the outside world.

I'm wondering if I need to have eth0 = 203.35.234.182
and eth0:0 = 192.168.1.5

There's supposedly an FAQ on this, but I couldn't find it !

Bryan

 
 
 

eth0, eth0:0 and Masq

Post by Marcus Faur » Tue, 24 Feb 1998 04:00:00



: Win 95 system 192.168.1.3
: SCO/UNIX 192.168.1.1
: Linux 192.168.1.5
: Linux has PPP link to ISP on 139.130.38.65.
: Linux needs to be seen by the world as 203.35.234.182

: These all talk fine on 192.168.1.X. The "netstat -nr" below from
: linux shows the routing:
: ----------------------------
: Kernel IP routing table
: Destination     Gateway         Genmask         Flags   MSS Window  irtt
: Iface
: 139.130.38.65   0.0.0.0         255.255.255.255 UH     1500 0     0 ppp0
: 203.35.234.176  0.0.0.0         255.255.255.248 U      1500 0     0 eth0:0
: 192.168.1.0     0.0.0.0         255.255.255.0   U      1500 0     0 eth0
: 127.0.0.0       0.0.0.0         255.0.0.0       U      3584 0     0 lo
: 0.0.0.0         139.130.38.65   0.0.0.0         UG     1500 0     0 ppp0

eth0 has to be 192.168.1.5, ppp0 has to be 203.35.234.182 ptp 139.130.38.65,
eth0:0 is irrelevant.

CU
  Marcus

 
 
 

eth0, eth0:0 and Masq

Post by Michele Nicosi » Tue, 24 Feb 1998 04:00:00


Quote:> #
> # Masquerading rules
> #

> LOCALNET=192.168.1.0/24
> ANYWHERE=any/0

> ipfwadm -F -p deny
> ipfwadm -F -a m -P tcp -S ${LOCALNET} -D ${ANYWHERE}
> ipfwadm -F -a m -P udp -S ${LOCALNET} -D ${ANYWHERE}

i think you can cut the above two lines and write directly

ipfwadm -F -a m -S $(LOCALNET) -D $(ANYWHERE)

so you can masquerade also icmp packet. With a packet sniffer i can see thta
the yneed to go outside.

                                    this is only a test, try it.....

 
 
 

1. rh7.1: delaying eth0 initialization?? eth0 startup fail?

Hi

I've wiped out my rh7.2 and downgraded to rh7.1, the system works
fine, however after some messinag around with linuxconf, i can't start
up my eth0 anymore. When i try to start it up, it saids :

Starting eth0: delaying eth0 initialization     [failed]

I've checked my network configurations and network scripts and
couldn't see what the problem is. Anyone out there help me? I don't
want to reinstall it AGAIN. Thanks.

Cheers,
Nev
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nevin Wong        | nevin at netvigator dot com
Nevolution        | http://nev.hello.to/
Model Making Ring | http://modelmakingring.hello.to

2. POP and shadow

3. eth0 shuts down with NETDEV WATCHDOG: eth0: transmit timed out error.

4. HP 600c Printer

5. "eth0" vs. "eth0:1"

6. post_menu --> items invisible

7. Possible? eth0:1 ... eth0:50000

8. Adding SSL Support to HTTP Client

9. What does Bringingup eth0: Delaying eth0 initialization <Failed> mean?

10. Q: want to keep eth0 as eth0... really.

11. Newbie eth0 eth0:0

12. eth0 and eth1 "Delaying eth0 Initialization" and "Delaying eth1 Initialization" errors

13. eth0 and eth0:0