Masq: of server internet, of clients internet?

Pagina: 1
Acties:

  • kmf
  • Registratie: November 2000
  • Niet online
Ik heb met de adsl4linux 1.08 progje voor elkaar gekregen om internet te krijgen op m'n linuxbak. Als ik de firewall die daarbij hoort installeert en draait, dan kan ik eindelijk internetten vanuit m'n workstations.

Echter, als ik die iptable-rules van dat progje gebruikt, dan kan ik wel op clients serven, maar niet meer vanuit de server zelf.
Ik heb niet echt een idee waar het aan ligt, en heb nog maar 1 dag om dit werkend te krijgen (dan is het weer tentamentijd) dus kan iemand mij misschien een hint geven?

Het ziet er naar uit dat ie niet meer weet van waar hij z'n internetpagina's moet ophalen. Als ik bv ping www.xs4all.nl doet dan zegt ie unknown host.

in de resolv.conf staat dit
code:
1
2
3
4
search localdomain
nameserver 127.0.0
nameserver 194.109.6.66
nameserver 194.109.9.99

zou toch moeten lukken? :?

One thing's certain: the iPad seriously increases toilet time.. tibber uitnodigingscode: bqufpqmp


  • DiedX
  • Registratie: December 2000
  • Laatst online: 02:22
Mag localhost wel naar buiten?

Doe eens ping www.xs4all.nl bijv?

DiedX supports the Roland™, Sound Blaster™ and Ad Lib™ sound cards


  • kmf
  • Registratie: November 2000
  • Niet online
Op zondag 09 december 2001 00:28 schreef DiedX het volgende:
Mag localhost wel naar buiten?

Doe eens ping www.xs4all.nl bijv?
normaal gesproken wel, maar zodra dat masq. geval van dat prog aan zit, gaat de ping heel lang zoeken en uiteindelijk, cannot find host


misschien handig als ik even de rules hierbij gooit (ik had intussen even bijna alles van wat ik dacht dat het probleem zou kunnen veroorzaken op "Y" (allow) gegooid....
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#
# /etc/adslfirewall.conf
#
# This is the configuration file of the firewall delivered by ADSL4Linux
#
# Created by:
# M.J. Prinsen - dompie@mail.com
# http://www.adsl4linux.nl
#
#
# $Id: adslfirewall.conf,v 1.3 2001/11/12 20:53:20 dompie Exp $
#

#----------------
# Initialisatie
#----------------

export ext_if=ppp+

# If you have a static IP-address use this
export ext_ip=213.84.14.117


# Uncomment this line if you have a dynamic IP-address and comment the line above !!!
# Also say dyn_ip=y if you have a dynamic IP-address
# export ext_ip=`/sbin/ifconfig ppp0 | awk '/inet addr:/ { print $2 }' | awk '{ split($0,ip,":") } END { print ip[2] }'`;
dyn_ip=n

# Assign the internal IP's
export local_if=eth0            # example: local_if="eth1"
export local_ip=192.168.0.1         # example: local_ip="192.168.1.1"
export local_net=192.168.0.0/24         # example: local_net="192.168.1.0/24"

# Assign modem IP
export modem_ip=10.0.0.138
export modem_net=10.0.0.0/24
export modem_eth=eth1           # example: modem_eth="eth0"
export modem_ethip=10.0.0.150           # example: modem_ethip="10.0.0.100"

# Broadcast address
export broadcast=255.255.255.255

# Ports
export unpriv_ports="1024:65535"

# Assign ntp IP 
export ntp_ip="194.109.6.65"            # example: ntp_ip="194.109.6.65 195.121.1.66"  
                        #(ntp.xs4all.nl / ntp.planet.nl)
                        # more than one ntp-server allowed

# Assign masqueraded machine IP
# Set this to an IP-address of a client-machine that is running VNC
export masq_machine_ip=192.168.200.20

# Private network classes
class_a="10.0.0.0/8"
class_b="172.16.0.0/12"
class_c="192.168.0.0/16"
class_d="224.0.0.0/4"
class_e="240.0.0.0/5"

#-------------------------------
# Enable features and services 
#-------------------------------
# Features
load_modules=y          # > Load kernel modules - if not compiled within the kernel
initialize_kernel=y     # > Enable kernel specific firewall rules and ip_forward
accept_pings=y          # > Accept all icmp or choose only to accept pings from www.watchmyserver.com (195.179.115.45)
mangle_tos=y            # > Optimize out- and throughput
refuse_common_ports=y         # > Especially necessary to set this feature when opening ALL unpriv_ports
block_trojans=y           # > Especially necessary to set this feature when opening ALL unpriv_ports
check_flags_packets=y       # > Especially necessary to set this feature when opening ALL unpriv_ports
spoofing_protection=y       # > Generic spoofing protection
abnamro=n           # > Route HomeNet through firewall :)
vnc_with_server=n         # > It is more secure to establish a VNC-connection with Linux server via a SSH-tunnel
                  #   Establish an unencrypted VNC-connection with Linux server
                  #   Default display :1
vnc_with_masq_machine=n     # > Set masq_machine_ip as well (see above)
                #   It is more secure to establish a VNC-connection with Linux server
                #   Default display :10 (only iptables)

private_rules=n         # > If you feel the need for private firewall rules.
                # > Add path to file with private firewall rules, permission chmod 0700
path_private_rules=/usr/local/sbin/privaterules

ip_block=n          # > If you want to block certain IP-numbers permanently
                # > Add path to file with IP-numbers to block permanently, permission chmod 0700
                #   Example: "xxx.xxx.xxx.xxx yyy.yyy.yyy.yyy zzz.zzz.zzz.zzz"
path_ip_block_file=/usr/local/sbin/ipblockfile

icq_filetransfer_all=n      # > Caution!!! Setting this to "y" will open ALL unpriv_ports
icq_filetransfer_friends=y  # > Restricted ICQ filetransfer based on IP-address
                #   Fill in IP-addresses below
icq_friends=""          # > Example: icq_friends="194.109.1.65 213.121.1.86"  


# Services
ftp_active=y            # > Enable active FTP - port 20
ftp_passive=y           # > Enable passive FTP - port 21
ftp_client=y            # > Enable active FTP with a FTP client to a remote server (only ipchains)
ssh=y               # > Enable SSH - port 22
telnet=n            # > Enable Telnet - port 23 - caution! not really secure (plain passwords)
smtp=y              # > Enable SMTP (mailserver) - port 25
dns=y               # > Enable DNS - port 53 - when running an own DNS-server only
dhcp=y              # > Enable DHCP - port 67 - when running an own DHCP-server only
http=y              # > Enable HTTP - port 80 - when running an own webserver
https=y             # > Enable HTTPS - port 443 - when running an own webserver with SSL
pop3=y              # > Enable POP3 - port 110 - when running a POP3-server
pop3s=y             # > Enable POP3 - port 995 - when running a POP3-server with SSL
auth=y              # > Enable ident - port 113 - when running a ident-server
ntp_tcp=y           # > Enable NTP - port 123 - when running a time-server
                #   Set ntp_ip as well (see above)
ntp_udp=y           # > Enable NTP - port 123 - when running a time-server (often only UDP is enough)
                #   Set ntp_ip as well (see above) 
imap=n              # > Enable IMAP - port 143 - when running a IMAP-server
imaps=n             # > Enable IMAP - port 143 - when running a IMAP-server with SSL
webmin=n            # > Enable Webmin - port 10000 - only if using webmin on remote location        

# That's it! Run the firewall and check your options!

One thing's certain: the iPad seriously increases toilet time.. tibber uitnodigingscode: bqufpqmp


  • saviour
  • Registratie: Juli 2000
  • Niet online
Nu ben ik slechts een grote newbie, maarre.. is het niet zo dat je nu juist alles forward naar de clients?

Anyway, dit is het script dat ik nu gebruik (masqadm + ipchains), kun je gewoon zelf aanpassen (dit is ook niet het script hoe ik het zelf gebruik) en het werkt prima voor me. Alleen moet je voor portforwarding iptables gebruiken met kernel 2.4 geloof ik

http://members1.chello.nl/rhm.soer/firewall.sh.txt

  • Gilles
  • Registratie: Februari 2000
  • Laatst online: 28-07-2025
nameserver 127.0.0

die moet weg hoor. Of het moet 127.0.0.1 worden als je zelf bind draait...

  • kmf
  • Registratie: November 2000
  • Niet online
Op zondag 09 december 2001 01:26 schreef gilles het volgende:
nameserver 127.0.0

die moet weg hoor. Of het moet 127.0.0.1 worden als je zelf bind draait...
Hmm.... zonder die loopback ding kan ik helemaal niet surfen....
dus ik denk dat het niet helemaal daar aan ligt...

eventjes al m'n config hier posten dan maar, misschien dat jullie er iets raars in zien.... ik weet het niet meer....




resolv.conf

search localdomain
nameserver 127.0.0
nameserver 194.109.6.66
nameserver 194.109.9.99



/etc/sysconfig/network

NETWORKING=yes
HOSTNAME=localhost.localdomain
FORWARD_IPV4="yes"

/etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1localhost.localdomain localhost
192.168.0.1 linuxkmf
192.168.0.2 athlonkmf
192.168.0.3 laptopkmf


/etc/hosts.allow

#
# hosts.allowThis file describes the names of the hosts which are
#allowed to use the local INET services, as decided
#by the '/usr/sbin/tcpd' server.
#

swat: 127.0.0.1 192.168.0.
192.168.0.1 linuxkmf
192.168.0.2 athlonkmf
192.168.0.#
# hosts.allowThis file describes the names of the hosts which are
#allowed to use the local INET services, as decided
#by the '/usr/sbin/tcpd' server.
#

swat: 127.0.0.1 192.168.0.
192.168.0.1 linuxkmf
192.168.0.2 athlonkmf
192.168.0.3 laptopkmf

One thing's certain: the iPad seriously increases toilet time.. tibber uitnodigingscode: bqufpqmp


Verwijderd

Hmm, het iptables script dat je post is niet het script met de rulesets, maar alleen het configbestand daarvoor. Zou je de rules ook kunnen posten?

En ugh,
Wat heb ik er een hekel aan wanneer een script zo enorm veel variabelen gebruikt.
Pagina: 1