Red Hat / Fedora :: Changing Outgoing DNS (port 53) IP Address With Iptables?

Mar 31, 2009

I need to know what the Iptables "code" is to change the outgoing/Incoming IP for port 53 (DNS). I'm running CentOS on a dedicated server. I very familiar with Putty and SSH. So I don't need much details, I just can't figure this out. I asked my server providor but they deleted my ticket and didn't answer me.I tried this but am not sure if this correct of working?

View 5 Replies


ADVERTISEMENT

Ubuntu Networking :: Setting Time Delay For IPTables (Incoming / Outgoing Port)

Mar 9, 2010

I've got a box with 2 interfaces, with IP1 = 192.168.100.1 and IP2 = 10.1.1.1 respectively on them. I've got an iptables rule that looks like:
Code:
iptables -t nat -A POSTROUTING -s 192.168.100.0/24 -d 10.0.0.0/8 -p udp -j SNAT --to-source 10.1.1.1 --random

If I get 2 consecutive packets from the same address and port from 192.168.100.0/24, they get SNAT-ed and come out of the same port on 10.1.1.1. If then I get another packet from the same address and port 10 minutes later, then it gets SNAT-ed, but comes out of a different port on 10.1.1.1. My question is: how can I set the time delay I would like iptables to remember its incoming address/port to outgoing port mappings?

View 3 Replies View Related

Networking :: Iptables Can't Port Forward (PAT Port Address Translation)?

Feb 20, 2010

I'm using a Debian servers, as router/firwall.. I've two ethernet interfaces into the server, one for wan and one for lan. The i use SNAT so my LAN clients can access the internet throgh the debian router. That is working... Now i want to be able to access servers on the LAN site from the WAN site, and i wanna use port address translation (PAT). I have a FTP server running on a lan server, so i'm trying to portward port 21.

iptables -t nat -A PREROUTING -p tcp -i eth1 -d (WANIP) --dport 21 -j DNAT --to 192.168.1.2:21

When people try to access my FTP from the WAN site, they are redirected to the local FTP server, and they are promted for crendentials, but when the credentials are typed, and the local ftp server should answer the wan request, the connections dies.

The wan clients are being promted for credentials, so they are redirected to the local lan server, but after that the connections dies, so i think there is some kind of nat problem, when the local lan server is trying to respond to the wan request..

Here i my iptables script:

#flush table
iptables -F
#input regler

[code]....

View 6 Replies View Related

Fedora :: Change Default Outgoing Ip Address

Mar 30, 2009

I've been trying to research this, but I don't really understand IP routing and it's bugging me that I can't fix this problem. I have a dedicated server (fedora core 7) with 3 IP addresses on the same eth0 interface. On the default IP address 62.193.226.127, there is some routing problem because I can't connect from the server to some other sites. Using one of the other IP addresses, like 62.193.252.129, I can connect fine. Additionally this address is better for sending mail because it coincides with the main domain name from which the mail is sent.My question is: how can I configure networking so that outgoing traffic from the box goes via 62.193.252.129?

View 2 Replies View Related

Fedora Servers :: Can't Send My Outgoing Mail Using Port 587 / Why Is So?

Dec 10, 2009

I have installed a sendmail server on fedora 10
I try to configure my sendmail server as a mail server to send outgoing email using port 587( because port 25 is blocked). after finishing configuring my sendmail server, i checked out my sendmail server using telnet localhost 587, and it worked fine as below code...

I have tried two different ways for user name: name, or name@mail.mydomian.com, but not working at all, the two results are the same.
PS: I have test port 587 and can use port 587 and Kmail to send outgoing mail using other external relay server

is my wrong configuration for sendmail server or kmail?

View 9 Replies View Related

Ubuntu :: Port Forwarding Crutch - Number Of Apps That Are Unable To Have The Outgoing Port Changed ?

Mar 28, 2010

I'm not that great with mailservers, and just been thrown a curveball with a MS Exchange environment for which there is apparently no solution... yeah, right. But is there a workaround?

The problem is that the site mail (SMTP) needs to be sent via port 26 instead of the commonly used 25. Port 25 is mapped to a mailfilter, which apparently causes havoc with some of the mail, and the techs that have been on site trying to coax the Exchange server to co-operate have said that the only way would be to get rid of the filter.

The problem is that there are number of apps that are unable to have the outgoing port changed and so keep sending mail out on port 25.

I look after the Unix/Linux side of things at work, and I was wondering if there was an easy way to set up a Ubuntu box to receive mail on port 25 and just forward it to the MS box on port 26? So, in other words (and I hope this makes sense): monitor port 25, and forward whatever comes in on port 25 to the server on port 26. Simple portforwarding, or is it? What steps do I need to take?

View 2 Replies View Related

Ubuntu :: How To Block All Outgoing With IPTables

May 10, 2010

I want to block all outgoing traffic with iptables and only allow a few specific websites. I would like to get the code to do so and also to revert the changes in case I want to unblock them.

View 1 Replies View Related

Networking :: IPTables Rule For Outgoing?

Dec 7, 2010

Unsure about IP tables lingo, so excuse me for not looking this up:I have a server, running IP tables, that I do not want to allow any type of outgoing traffic to 192.168.1.21

View 3 Replies View Related

General :: Blocking Outgoing Ssh Using Iptables?

Aug 19, 2009

I want to block all the outgoing ssh form my machine, i.e my machine will not be able to ssh to any outside machine using iptables. The distro is RHEL, I added the following entry in the iptables but unfortunately it didnt worked, -A OUTPUT -p tcp -m tcp --dport 22 -j DROP

View 13 Replies View Related

Ubuntu :: IPTables Configuration Just Allow Outgoing To HTTP / DNS

Nov 18, 2010

Rather new to Ubuntu. I was wondering for advice on a basic iptables configuration blocking all incoming/forward and just allowing outgoing to http(s) and dns of course.

View 5 Replies View Related

Networking :: Iptables REDIRECTing - All Outgoing Packets ?

Dec 6, 2010

I've been trying to redirect all outgoing packets (destined for a specified ip address) from my slack box back to itself. I thought this could be done with iptables, but if I fire up wireshark I can clearly see that the packets are getting out to the real server and I'm getting responses from it.

So here's what I tried:

All looks good and fine, and then I even try to visit 194.28.157.42 with firefox (by the way I am running a webserver, that is set to show a page when you visit 127.0.0.1) and I get an error page that reads: 502 Bad Gateway.

I ignored this message to see what the program I'm trying to interrupt does, and when I start wireshark and then start the program that is using that website, I can clearly see that the packets make it to the real 194.28.157.42 and get back responses.

View 1 Replies View Related

Networking :: Iptables Outgoing Adress Using An Aliased Interface?

Dec 15, 2010

it�s been several years since i played with iptables. I have setup like this:eth0 is the only physical device on box and eth0:0 is aliased. Traffic going out of the box to internet uses eth0eth0 116.55.58.1eth0:0 116.55.58.2I have a service listening on port 80 on 116.55.58.2Lets say my client connect to 116.55.58.2:80 through 116.55.58.1 , how do I force (mangle you name it) with iptables that the outgoing source address will be always 116.55.58.2?

View 1 Replies View Related

Red Hat / Fedora :: IPTables In Part Of SSH (Port 22)

Jun 1, 2011

I have blocked all connection with iptables and allowed only the loopback:
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP

Next I want to allow only ssh connections, and also I want to record the IP address of each attempt to access port 22 using the recent module. Then I want to to see if that IP address has attempted to connect 2 or more times within the last 60 seconds, and if not then the packet is accepted:
iptables -A INPUT -p tcp --dport 22 -m recent --set --name ssh --rsource
iptables -A INPUT -p tcp --dport 22 -m recent ! --rcheck --seconds 60 --hitcount 2 --name ssh --rsource -j ACCEPT
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --sport 22 -j ACCEPT
iptables -A INPUT -j DROP
iptables -A OUTPUT -j DROP

View 9 Replies View Related

Networking :: Using A Different OUTGOING IP ADDRESS

Jun 23, 2010

I am testing my setup which will have 2 public servers. HTTP & MAIL both with reverse DNS established.

www.mydomain.no -> xxx.xxx.xxx.034 -> internal name server
mail.mydomain.no -> xxx.xxx.xxx.035 -> internal name mail
Both addresses are on the same NIC with 34 being the main address.

The system work fine except one thing. The IP address mail sends out from is the Firewall Address _FW. I can see why as the default gateway set on the mail server is the FW_IP (The main gateway ip)How can I get the MAIL server to send through it's own public IP.I understand I can change the Firewall public IP to that of the Mail server and that would cure the problem for now. If it's possible I would like to learn a little in the process.

View 10 Replies View Related

Ubuntu Networking :: Iptables: Block Incoming And Allow Outgoing Traffic

Jan 6, 2011

I need to configure iptables to block incoming traffic (except specific ports), but allows all outgoing traffic.

I am able to block incoming traffic, but doing so also prevents outgoing traffic (tested by telnet [URL] 80)

The following was used:

iptables -A INPUT -p tcp --dport ssh -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -I INPUT 1 -i lo -j ACCEPT
iptables -A INPUT -j DROP

Also, even allowing NOT SYN requests still prevents outgoing traffic.

iptables -I INPUT 1 -p tcp ! --syn -j ACCEPT

Another point:

# modinfo ipt_state
modinfo: could not open /lib/modules/2.6.18-028stab070.14/modules.dep

How to install ipt_state module on ubuntu?

View 2 Replies View Related

Fedora Networking :: How To Forward A Port Using Iptables

May 7, 2009

I need to forward a port to use dtella. I'm using Fedora 10, using iptables for my firewall.

I'm currently trying to forward it from terminal with this command:

Code:
sudo iptables -t nat -A PREROUTING -p udp -i eth0 -d [ip address] --dport 11823 -j DNAT --to 192.168.0.2:80
this is what I get from iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED

[Code].....

View 9 Replies View Related

Security :: Iptables: Verify Traffic On Port To Check If It Is Legitimate For That Port?

Apr 18, 2011

Is there any way to verify if packets being trafficked over a certain port are valid for the service you want to use this port for?

One obvious example that probably clarifies my question:
When I open port 443 (outgoing or incoming) for https/ssl traffic, I don't want this port to be used for say openvpn traffic.
Thus: when someone wants to surf to a website with https, it should be ok but if someone wants to connect to his home openvpn server over that same port, it should be blocked.

View 5 Replies View Related

Networking :: Use Iptables In Order To Forward All The Incoming Packets For Port 5555 To Port 5556?

Apr 4, 2011

I'm trying to use iptables in order to forward all the incoming packets for port 5555 to port 5556 on the same server (192.168.2.101).

I wrote the following commands:

iptables -A PREROUTING -t nat -i any -p tcp --dport 5555 -j DNAT --to 192.168.2.101:5556
iptables -A FORWARD -p tcp -m state --state NEW -d 192.168.2.101 --dport 5556 -j ACCEPT

View 3 Replies View Related

Server :: If Forward A Port In Iptables, Does The Port Have To Be Open On The Firewall

Aug 5, 2009

If I forward port 80 to port 3128 for squid with an iptable rule, does port 3128 have to be open on the firewall or is this all routed behind the firewall?

View 4 Replies View Related

Red Hat / Fedora :: Changing The Port Number To Something Like 81?

Jan 16, 2011

i have installed CentOS along with ISPConfig. For some reason apache will not run it says there are no listening sockets avaliable. I have done a netstat and also tried nmap to see if any other service was using port 80 but it doesnt show anything. I also tried changing the port number to something like 81 still no go. On bootup of CentOS it shows the error and a message saying unable to open logs.

View 1 Replies View Related

Networking :: Iptables - Allow Http And Https Together With Mail Server (incoming And Outgoing) And Ftp - Ftps And Ssh

Apr 28, 2010

i need is to have http and https allowed, together with mail server (incoming and outgoing) and ftp, ftps and ssh. all other ports have to be closed.

View 3 Replies View Related

Networking :: IPtables: Route Outgoing Traffic From Internal Host To Only Go A Internet Interface?

Nov 21, 2010

My Ubuntu Box has 3 interfaces. eth0 (Internal 192.168.1.0/24)eth1 (External ISP DHCP)eth2 (External ISP Static IP)I need the outgoing traffic to internet for 1 of the internal pc (192.168.1.10) to only go only go through eth2

View 4 Replies View Related

Networking :: Ip Address Is Automatically Changing In Fedora?

Mar 1, 2011

in our server, Fedora 10 64 bit in this,IP Address is automatically changing Actually IP Address is 192.168.1.50 it changing frequently.if i try to edit that to normal it is not showing options. net mask is also is changing from 255.255.255.0 to 24 After reboot the system ,through LAN it is accessible .But not through the network.

View 2 Replies View Related

Networking :: Outgoing Port Forwarding Wrt54gs?

Feb 22, 2010

How would one forward a specific outgoing port to a local computer?

E.G.
Router: 192.168.1.1
Comp 1: 192.168.1.100
Comp 2: 192.168.1.200

When Comp 1 tries to browse to an internet page, forward that connection via the router to comp 2 to display a custom webpage. Using WRT54GS

View 6 Replies View Related

Networking :: Iptables - Port Forwarding To Blocked Port?

Mar 25, 2010

I have a mail server on which I would like to block port 25 on my eth0 for everyone except our external spam filter. the problem is that I want our users to be able to connect via port 10025 which is forwarded to port 25, which then is blocked...

View 2 Replies View Related

Fedora :: Using Iptables To Make Port 22 Accessible Through 4455 Externally

Apr 16, 2011

Have previously moved my ssh server from 22 to 4455 just by moving the port in sshd_config. This is done to minimize the log entries resulting from brute force attacks.However, it seems like Zimbra and other local services expect to find the ssh service locally available on port 22, so I figured it's better to move the port in the firewall so that it remains configured on port 22 in sshd_config, and instead use iptables with a nat/port rewrite to move 4455 incoming to 22 locally.

Isolated this works as long as I also keep allowing port 22, but the moment I close port 22, port 4455 is also dead, which sort of defies the purpose

View 2 Replies View Related

OpenSUSE Network :: Mail Server Outgoing Address?

Feb 15, 2010

I just set up a new router for our home office. I've enabled traffic logging, and I'd like to have the logs emailed to me. However, in order to configure email-notification, the router needs and outgoing mail server. Forgive me, but I don't really understand the terminology being used here. I've googled this a bit, but I'm not sure I now what "outgoing" vs "incoming" mean in the context. I tried using my gmail account as the outgoing mail server (smpt.gmail.com) but it requires TTLS encryption, and there's no option for that on my router.

So I figured I'd setup a simple mail server on my local network. I have a dedicated server machine, so I'd just configure a mail server there. But I got stumped at the first input box (in the yast module):"Outgoing Mail Server".That's what I wanted to use this server for. What is this "outgoing mail server"? I understand it in a normal emai context (I think) but this is confusing me. I've read through the HowTo on the openSUSE wiki, but it still doesn't answer this question.Isn't there some way to have a simple, local mail server (without MX records and the like) so I can send email from a local machine?

View 2 Replies View Related

General :: Windows - Selecting Which IP Address To Use For Outgoing Requests From Behind A NAT

Mar 12, 2010

Our organization has several external IP addresses. I am behind 2 layers of NAT and the servers choose which IP address to route my traffic to. Can I specify which IP address to use when finally leaving the organizations network. I know that source routing can be done in IPv4 by adding some options in the header. But can I configure my PC to add these options automatically. I have both a Windows and a Linux Machine.

View 1 Replies View Related

Ubuntu :: Hiding IP Address In Outgoing Email Headers

Feb 21, 2010

I just discovered View > "All message headers" in the Evolution email client and am quite concerned that all my out going emails contain my personal IP Address. I know that this is standard email protocol but i'm wondering if it is possible to hide or modify this header information? Or would i be better off using a webmail client?

View 5 Replies View Related

Networking :: How To Make Outgoing Traffic Show From Different IP Address?

Nov 4, 2009

I have a Linux IPTables firewall on Centos 5.3.It has one physical interface to the internet and 2 internal interfaces to a DMZ and TRUSTED zone respectively.There are 10 virtual interfaces linked to the physical public interface.Emails are being sent from my server in the DMZ out to the internet, but it is being shown as coming from the firewall IP address.It must show as coming from one of the virtual interfaces.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved