Skip to contentSkip to conversation

Configuration question...

DISCUSSION Martín 2 participants 4 messages Nov 3, 2003

lore
Share & tools
lore

Martín

author
#0 lore raw

This is the situation:

I hace a linux machine, giving internet access to a win98 machine. The win98 machine has a soft wich does not accept NAT, so the soft does not work when has to connect to internet.
Linux: eth0 (wich is conected to the adsl modem > ppp0 ) 192.168.1.10

      eth1 (interface conected to the LAN, IP 192.168.2.1)

Win98: IP 192.168.2.5

What I need to do is: make the win98 software believe that it is connecting to a server service in the linux machine to port 10329, and that traffic has to be redirected to an external Ip in internet (the real server with the service in port 10329). And the, the traffic comeing fron that server has to be redirected to the win98 machine but with the source IP changed to 192.168.2.1 (the internal IP of the linux)

Can tell me the comands to configure the linux and iptables to do this? Thanks

#1 lore raw

Modules and others

Hey everyone,
Hope someone can help me with this. Well, here it goes:
1.)If I recompile IP tunneling and IP GRE into the kernel as to compiling it as a module, how do I check to see if its properly installed? If I had compiled it as a module, I would simply do a 'lsmod'.
Any help is appreciated!

Regards
edmund

#2 lore raw
In reply to Martín

Martin,

You can use a prerouting :
Assuming you want to connect to a tcp port 10329 on the linux machine.

/iptables -t nat -A PREROUTING -i eth1 -d 192.168.2.1 -p tcp --dport 10329 -j DNAT --to (the real server IP)

regards
edmund

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Martín
Sent: Monday, November 03, 2003 12:48 PM
To: [email protected]
Subject: Configuration question...

This is the situation:

I hace a linux machine, giving internet access to a win98 machine. The win98 machine has a soft wich does not accept NAT, so the soft does not work when has to connect to internet.
Linux: eth0 (wich is conected to the adsl modem > ppp0 ) 192.168.1.10

       eth1 (interface conected to the LAN, IP 192.168.2.1)

Win98: IP 192.168.2.5

What I need to do is: make the win98 software believe that it is connecting
to a server service in the linux machine to port 10329, and that traffic

has to be redirected to an external Ip in internet (the real server with

the service in port 10329). And the, the traffic comeing fron that server
has to be redirected to the win98 machine but with the source IP changed to
192.168.2.1 (the internal IP of the linux)

Can tell me the comands to configure the linux and iptables to do this? Thanks

#3 lore raw

Sorry, previous email was incomplete. This should work.

/iptables -t nat -A PREROUTING -i eth1 -d 192.168.2.1 -p tcp --dport 10329 -j DNAT --to (the real server IP):(port)

regards
edmund

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Edmund Turner
Sent: Monday, November 03, 2003 3:00 PM
To: 'Martín'; [email protected]
Subject: RE: Configuration question...

Martin,

You can use a prerouting :
Assuming you want to connect to a tcp port 10329 on the linux machine.

/iptables -t nat -A PREROUTING -i eth1 -d 192.168.2.1 -p tcp --dport 10329 -j DNAT --to (the real server IP)

regards
edmund

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Martín
Sent: Monday, November 03, 2003 12:48 PM
To: [email protected]
Subject: Configuration question...

This is the situation:

I hace a linux machine, giving internet access to a win98 machine. The win98 machine has a soft wich does not accept NAT, so the soft does not work when has to connect to internet.
Linux: eth0 (wich is conected to the adsl modem > ppp0 ) 192.168.1.10

       eth1 (interface conected to the LAN, IP 192.168.2.1)

Win98: IP 192.168.2.5

What I need to do is: make the win98 software believe that it is connecting
to a server service in the linux machine to port 10329, and that traffic

has to be redirected to an external Ip in internet (the real server with

the service in port 10329). And the, the traffic comeing fron that server
has to be redirected to the win98 machine but with the source IP changed to
192.168.2.1 (the internal IP of the linux)

Can tell me the comands to configure the linux and iptables to do this? Thanks