Sharing combat Redhat9 ADSL Internet server configuration
Many articles are online all, but according to their methods are not effective, integrated approach to them, and finally succeeded! We hope to write a help, please contact petehero@126.com discuss issues
Redhat server:
NIC eth0: 192.168.0.1/255.255.255.0 other gateways, dns, and so do not deploy client:
IP address set to 192.168.0.2-192.168.0.254 between the ip address, subnet mask is 255.255.255.0, the gateway point to 192.168.0.1, at the ISP's DNS DNS address, such as 202.106.0.20, etc..
Redhat9 already installed adsl default dial-up procedures. Can be configured directly.
Command line and type: adsl-enter the setup configuration dialogue (if not find a path, input / sbin / adsl-setup)
Welcome to the ADSL client setup. First, I will run some checks on
Your system to make sure the PPPoE client is installed properly …
The following DSL config was found on your system:
Device: Name:
Ppp0 DSLppp0
Please enter the device if you want to configure the present DSL config
(Default ppp0) or enter n if you want to create a new one: the establishment of a dial-up connection name, the default on the direct round trip
LOGIN NAME
Enter your Login Name (default): Enter the landing ADSL account user name
INTERFACE
Enter the Ethernet interface connected to the ADSL modem
For Solaris, and this is likely to be something like / dev/hme0.
For Linux, it will be ethX, where X is a number.
(Default eth0): ADSL dial-up use of the card, and if there is only one card, Enter the use of default values
Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
After which the link should be dropped. If you want the link to
Stay up permanently, enter no (two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP
Addresses. You may have some problems with demand-activated links.
Enter the demand value (default no): The default on the line
DNS
Please enter the IP address of your ISPs primary DNS server.
If your ISP claims that the server will provide dynamic DNS addresses,
Enter server (all lower-case) here.
If you just press enter, I will assume you know what you are
Doing and not modify your DNS setup.
Enter the DNS information here: Do not fill in any DNS addresses from the ISP ADSL automatic gain dns addresses
PASSWORD
Please enter your Password: Enter ADSL account password
Please re-enter your Password: password authentication
USERCTRL
Please enter yes (two letters, lower-case.) If you want to allow
Normal user to start or stop DSL connection (default yes): The default on the line
FIREWALLING
Please choose the firewall rules to use. Note that these rules are
Very basic. You are strongly encouraged to use a more sophisticated
Firewall setup; however, these will provide basic security. If you
Are running any servers on your machine, you must choose NONE and
Set up firewalling yourself. Otherwise, the firewall rules will deny
Access to all standard servers like Web, e-mail, ftp, etc. If you
Are using SSH, the rules will block outgoing SSH connections which
Allocate a privileged source port.
The firewall choices are:
0 - NONE: This script will not set any firewall rules. You are responsible
For ensuring the security of your machine. You are STRONGLY
Recommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway
For a LAN
Choose a type of firewall (0-2): So option 2, as a gateway
Start this connection at boot time
Do you want to start this connection at boot time?
Please enter no or yes (default no): If it is elected on a month so yes, even on network startup
** Summary of what you entered **
Ethernet Interface: eth1
User name: username
Activate-on-demand: No
DNS: Do not adjust
Firewalling: MASQUERADE
User Control: yes
Accept these settings and adjust configuration files (y / n)? Choose yes, save the settings.
Adsl completion of this allocation, we have to use a command / sbin / adsl-start to activate ADSL connection, if your user name and password correctly, we should be on the company.
Can also order / sbin / adsl-to inspect the status ADSL connection status, if:
Adsl-status: Link is up and running on interface ppp0
Ppp0 Link encap: Point-to-Point Protocol
Inet addr: xxxx PtP: yyyy Mask: 255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU: 1492 Metric: 1
RX packets: 8191 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 12153 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 3
RX bytes: 7135851 (6.8 Mb) TX bytes: 1083961 (1.0 Mb)
Adsl that have been connected to the network. Xxxx that your ip address, yyyy said adsl gateway address.
Open your browser to see whether they can access the Internet. If that does not. Run the following commands:
/ Sbin / route del default
/ Sbin / route add default gw yyyy
Yyyy is adsl gateway address, speaking in front of the use of / sbin / adsl-order status can be seen.
At this point ping external ip address should not be a problem, the machine can be connected via a Web browser.
Add to the above two / etc / rc.d / rc.local, guarantee the right of each routing can be activated when connected to the network.
Below Internet sharing configuration:
Modify / etc / sysconfig / iptables (the original contents deleted), is amended as follows End
# Firewall configuration written by petehero
# Manual customization of this file is not recommended.
# Note: ifup-post will punch the current nameservers through the
# Firewall; such entries will * not * be listed here.
* Mangle
: PREROUTING ACCEPT [0-0]
: INPUT ACCEPT [0-0]
: FORWARD ACCEPT [0-0]
: OUTPUT ACCEPT [0-0]
: POSTROUTING ACCEPT [0-0]
* Nat
: PREROUTING ACCEPT [0-0]
: POSTROUTING ACCEPT [0-0]
: OUTPUT ACCEPT [0-0]
- A POSTROUTING-s 192.168.0.0/255.255.255.0-o ppp0-j MASQUERADE
COMMIT
* Filter
: INPUT ACCEPT [0-0]
: FORWARD ACCEPT [0-0]
: OUTPUT ACCEPT [0-0]
COMMIT
Modify / etc / sysctl.conf, the net.ipv4.ip_forward set to 1, as follows:
Net.ipv4.ip_forward = 1
Iptables-t nat-L-n Acting see whether the rules correctly, the results are as follows:
[Root @ localhost root] # iptables-t nat-L-n
Chain PREROUTING (policy ACCEPT)
Target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
Target prot opt source destination
MASQUERADE all - 192.168.0.0/24 0.0.0.0 / 0
Chain OUTPUT (policy ACCEPT)
Target prot opt source destination
Cat / proc/sys/net/ipv4/ip_forward see whether the value of 1 results are as follows:
[Root @ localhost root] $ cat / proc/sys/net/ipv4/ip_forward
1
The resumption of network services and iptables service, or directly from the re-allocation of machines can be completed.
Now if the client has been set up ip address and dns address, the server can be shared through the Internet.
Tags: adsl, configuration








0 Comments to “Sharing combat Redhat9 ADSL Internet server configuration”
No Comments. Send your comment.
Leave a Reply
You must be logged in to post a comment.