Ir ao conteúdo

Compartilhar internet com servidor na porta WAN.

Boa tarde,

Os ultimos dias passei instalando o servidor e com uns problemas para configurar o mesmo. Eu sabia como configurar a rede para funcionar da seguinte maneira:

MODEM -> (eth0) Servidor (eth1) -> (Porta lan) Router (Portas lan) -> Computadores

Porém não era essa topologia que eu desejava, pois com está eu perdia a porta WAN do meu roteador. Então decidi fazer a seguinte:

MODEM -> (eth0) Servidor (eth1) -> (Porta WAN) Router (Portas LAN) -> Computadores

Inicialmente, deixei meu servidor ligado somente ao modem e testei se o mesmo conseguia pingar a internet. Até o momento tudo ok.

Acessei o arquivo “/etc/network/interfaces” e configurei a eth1 manualmente da seguinte maneira:

auto eth1
iface eth1 inet static
address 192.168.100.254
netmask 255.255.255.0
network 192.168.100.0
broadcast 192.168.100.255

Logo em seguida adicionei as regras de iptables:

sysctl net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING –out-interface eth0 -j MASQUERADE
iptables -A FORWARD –in-interface eth0 -j ACCEPT

Teoricamente o compartilhamento de internet já devia estar funcionando. Mas não foi isso que aconteceu. Resolvi acessar o meu Roteador pela Lan e configura-lo manualmente da seguinte maneira:

IP Address : 192.168.100.1
Subnet Mask : 255.255.255.0
ISP Gateway Address : 192.168.100.254
Primary DNS Address : 200.247.141.11 (DNS VIRTUA SC)
Secondary DNS Address : 200.247.141.12 (DNS VIRTUA SC)

Salvei as modificações, esperei o mesmo ser reiniciado e pronto. Conexão funcionando.

Eu sei que isso não ficou como um tutorial, ficou um “relato” mas este relato pode lhe ajudar a configurar se você seguir os mesmos passos que eu. Lembre-se também que as regras de iptables devem ser executadas sempre na inicialização do servidor. Saiba mais sobre Executar scripts ao iniciar computador.

Demorei bastante tempo e testei várias configurações para que conseguisse tudo funcionando mas acredito que o meu maior problema foi ter usado a mesma Classe de IPS para a rede interna (atrás do roteador) e a “externa” (comunicação entre o roteador e servidor).

Qualquer problema com Compartilhamento ou coisas do tipo, não hesite em perguntar.

Espero que este artigo seja de grande ajuda,
Matheus

Agradecimentos ao Ubuntu Forum que me deu uma ajuda.

Publicado emAprendendoLinux

73 Comentários

  1. Die Benutzerfreundlichkeit und das moderne Design einer Glücksspielplattform sind entscheidend für ein erstklassiges Spielerlebnis.

    Von klassischen Slots bis hin zu fesselnden Live-Dealer-Spielen bietet die Plattform eine breite Palette.

    Diese umfassende Erkundung bietet einen detaillierten Einblick in die Geschichte, besondere Merkmale und das fesselnde
    Spielerlebnis von Casino of Gold – von den Anfängen bis zu den aktuellen Höhepunkten.
    Mit diesem speziellen Code erhalten Sie zusätzliche
    Boni, die Ihre Gewinnchancen erhöhen und Ihnen mehr
    Spaß beim Spielen ermöglichen. Egal, ob Sie in der Mittagspause, im Zug oder
    gemütlich zu Hause sind, die Casino of Gold App bietet ein echtes Casino-Erlebnis
    in der Handfläche. Die App ermöglicht es den Spielern, ihre Lieblingsspiele jederzeit und überall zu
    genießen. Die Casino of Gold App verfügt über eine große Auswahl an Spielen, darunter
    klassische Tischspiele wie Blackjack, Roulette und Poker. Mit einer
    übersichtlichen Benutzeroberfläche und beeindruckenden Grafiken ist diese App einfach zu bedienen und bietet stundenlange Unterhaltung.

    References:
    https://online-spielhallen.de/ihre-einfache-schritte-zum-izzi-casino-login/

  2. After weeks of testing, depositing, spinning, and cashing out, I’ve narrowed down the top-rated real money online casinos Australia has to offer.

    Top online casinos in Australia for real money are home to a wide variety of blackjack games.

    Signing up with any of my recommended real
    money Australian online casinos gives you access to over 5,000 games, sometimes even double that.
    Australian real money online casinos offer great
    payout percentage.
    Because they have no domestic online casinos, there is
    still no legislating body that covers them. The only entity that could find themselves
    in legal hot water by offering a real money gambling option to Aussies is the
    gambling site’s host. We rate online casinos on how easily you can get helpful support
    when you need it.

    References:
    https://blackcoin.co/lucky-elf-casino-discover-top-slot-experiences-in-australia/

  3. Looking for a casino? elon casino top: slots, live casino, bonus offers, and tournaments. We cover the rules, wagering requirements, withdrawals, and account security. Please review the terms and conditions before playing.

  4. You can make and receive payments from any online gambling website that accepts
    cryptos. You can deposit funds into your casino account using an e-wallet method.
    This payment option is perfect for players who want to withdraw
    their winnings using a link. The best part is that they are accepted by leading AU casino
    websites. All you need is a bank account connected to your card, and you can deposit funds into your casino account
    easily.
    No wagering casino bonuses are the most sought-after online casino bonuses for
    Australian players. These exclusive online casino
    bonuses often include free spins, bonus cash, or no-deposit rewards, giving you extra value just for playing on your birthday.
    Additionally, we prioritise casinos that promote responsible gambling measures, such as self-exclusion options
    and deposit limits, to protect players and foster a trustworthy experience.
    A diverse game selection combined with transparent
    RTP and certified fairness enhances your overall player casino experience and maximises
    the value of your on casino online bonuses.
    The best casino bonuses apply to a broad range of games, including
    online slots, table games, and live dealer options such as blackjack, roulette, and baccarat.

    References:
    https://blackcoin.co/yukon-gold-casino-a-member-of-casino-rewards/

  5. Please note that we do not offer customer service or support for
    these incentives. To start playing, first do research and select a reputable site.

    With their alluring mechanics and prospects of scoring a jackpot,
    users search for strategies to improve their pokie machine experience.
    The comprehensive benefits of high roller programs ensure punters receive premium treatment and rewards commensurate with their level of play.

    Among the myriad offerings of iGaming sites, pokies are
    the most common titles many gamblers play. It’s about
    the holistic experience – from the security
    that gives players peace of mind, to the variety of apps
    that cater to diverse gaming tastes. However, it’s important to note that email may
    have a slightly longer response time compared to live chat or phone support, which some players may perceive as a minor setback.
    By doing so, you can indulge in your favorite games at any time and from anywhere, ensuring a seamless and immersive gaming experience.
    Look for casinos offering 24/7 support through various channels, including
    live chat, email, and phone, to promptly resolve
    any issues you might encounter. Our aim is not just to guide you towards high payout casinos,
    but also to ensure a secure and enjoyable gaming experience.

    Withdrawing funds from a casino takes less than 24 hours; deposits are
    instant. You can use your iOS or Android device to play your
    favorite pokies. Moreover, RTG’s games are all compatible with
    mobile devices. Modern 3D realities and animations are also included
    in their pokies.

    References:
    https://blackcoin.co/welcome-to-crown-hotels-your-ultimate-casino-experience/

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *