yea ignore those links - that is what im just typing into my browser
No matter what i try i cant seem to get fort porwarding working so i can have my web server on 192.168.0.197
have setup like this
(cloud)---[ppp0{linux}eth0]--------[192.168.0.197]
all default rules in iptables set to ACCEPT
2 rules in place
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
(so i can access the net from internal side)
and
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to-destination 192.168.0.197:80
(hoping to forward port 80 requests to web server)
When i try to access my web page from either machine i get a message from mozilla saying connection refused. This message also comes up if there is no web server running when connecting to http://192.168.0.197 so i gather its is not refused but not to be found.
If i am running the web server i can connect by http://192.168.0.197.
Anyone ever got this to work? Can you see what im doing wrong?
Its better to regret something you have done than to regret something you havent done :P
yea ignore those links - that is what im just typing into my browser
Its better to regret something you have done than to regret something you havent done :P
See this page wasnt on the recent posts so i updated it to put it there, coz thats the one that matters.
http://www.getlinuxonline.com/yabbse...;threadid=2110
Its better to regret something you have done than to regret something you havent done :P
Now have you looked at your log to see if it is actually refusing your connection through the log or whether it is experiencing some kind of other error?
Aragorn
If you give a man a fire he'll be warm, if you light the man on fire he'll be warm for life.
What is your external IP? I would like to try connecting to your webserver. To me it looks like you have your IPTABLES correct. Are you trying to access your webpage with your external IP or your internal IP?
AMD Athlon 2200+ 1.8Ghz
1280MB PC-3200 CAS2.5 RAM
ATI Radeon 9600 Pro 128MB AGP
Western Digital WDC WD2500JB-00FUA0 250GB 7200 rpm ATA/133
Seagate ST3200822A 200GB 7200 rpm ATA/133
Western Digital WDC WD1200BB-00CAA1 120GB 7200 rpm ATA/133
Western Digital WDC WD800BB-00CAA1 80GB 7200 rpm ATA/133
Maxtor OneTouch 2HA43R32 1TB 7200 rpm USB 2.0
D-Link DFE-530TX+ 10/100 NIC
D-Link DWL-G520 Rev.A
Debian 5.0r1 Lenny
Might be hard to connect to the web server - its not always up,im just doing this for learning purposes. And its on a 56k dial up which gets disconnected every 4 hrs.
Would be useful if i could VNC into someones computer and then try to look at it from there, but whos gonna let me do that LOL
Anyway im trying to connecting with the external ip address, I am using dynDNS so im actually typing in the domain - not the ip. Except when i try it internally (192.168.0.197)
Maybe because im trying to access it from the internal side that its giving me probs? Dont see why this should happen though.
You know what,i have never really used logs, im not sure where to start - where are they?Now have you looked at your log to see if it is actually refusing your connection through the log or whether it is experiencing some kind of other error?
Its better to regret something you have done than to regret something you havent done :P
I think that is the reason you are getting problems. I believe there is a different way to setup IPTABLES for LAN to LAN access.
This is a redirection hack that should work, but perhaps there is a better way still.
$IPTABLES -t nat -A PREROUTING -d $EXTIP -p tcp --dport 80 -m state --state NEW,ESTABLISHED,RELATED -j DNAT --to 192.168.0.197
When your $EXTIP changes your going to be hurting again. I'm not sure if you can put your dynDNS in stead of a real IP, but you can try.
AMD Athlon 2200+ 1.8Ghz
1280MB PC-3200 CAS2.5 RAM
ATI Radeon 9600 Pro 128MB AGP
Western Digital WDC WD2500JB-00FUA0 250GB 7200 rpm ATA/133
Seagate ST3200822A 200GB 7200 rpm ATA/133
Western Digital WDC WD1200BB-00CAA1 120GB 7200 rpm ATA/133
Western Digital WDC WD800BB-00CAA1 80GB 7200 rpm ATA/133
Maxtor OneTouch 2HA43R32 1TB 7200 rpm USB 2.0
D-Link DFE-530TX+ 10/100 NIC
D-Link DWL-G520 Rev.A
Debian 5.0r1 Lenny
you were right the internal lan is the only place i cant get to it from. I set up the server then went to work and i could see the web server - yay!
now to figure out how to get asscess from inside - ill work on it a bit more.
And Skynet you can type in FQDN in iptables, but it just translates it to ip addresses so you would want to run your iptables script everytime your ip changes.
or if you are using iptables save then you are in trouble.
Thanks guys
Its better to regret something you have done than to regret something you havent done :P
Bookmarks